Skip to content

fix: align timeline component dimensions based on size prop#49

Open
hitomihiumi wants to merge 2 commits intoonce-ui-system:mainfrom
hitomihiumi:#43-timeline-alignment-fix-
Open

fix: align timeline component dimensions based on size prop#49
hitomihiumi wants to merge 2 commits intoonce-ui-system:mainfrom
hitomihiumi:#43-timeline-alignment-fix-

Conversation

@hitomihiumi
Copy link
Copy Markdown
Contributor

The indentation height is now dynamic and depends on the size of the marker. #43

Without fix:

With fix:

Copilot AI review requested due to automatic review settings March 13, 2026 01:10
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 13, 2026

@hitomihiumi is attempting to deploy a commit to the Dopler Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Timeline component’s sizing/spacing logic (introducing shared size/offset tokens and some horizontal padding tweaks) and updates the Text component documentation to remove the deprecated/unsupported type prop from the API reference.

Changes:

  • Refactor Timeline marker sizing and offset calculations into shared dimensionSize / topOffset values.
  • Adjust Timeline marker container spacing (e.g., marginTop and horizontal edge padding) and reformat conditional props for readability.
  • Remove type from the Text docs API reference table.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/core/src/components/Timeline.tsx Refactors marker sizing/offset handling and adjusts layout props for vertical/horizontal timeline rendering.
apps/docs/src/content/once-ui/components/text.mdx Updates Text component API reference to remove type prop.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const dimensionSize =
size === "xs" ? "8" : size === "s" ? "24" : size === "m" ? "32" : size === "l" ? "40" : "48";
const topOffset =
size === "xs" ? "20" : size === "s" ? "12" : size === "m" ? "8" : size === "l" ? "4" : "0";
Comment on lines 321 to 329
<PropsTable
content={[
["as", "ElementType", `"span"`],
["variant", "TextVariant"],
["size", ["xs", "s", "m", "l", "xl"]],
["weight", ["default", "strong"]],
["type", ["display", "heading", "body", "label", "code"]],
["family", ["display", "heading", "body", "label", "code"]],
["onBackground", "`${ColorScheme}-${ColorWeight}`"],
["onSolid", "`${ColorScheme}-${ColorWeight}`"],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants