Skip to content

Input: name the label-layout axis orientation, not variant#103

Merged
lifeiscontent merged 2 commits into
mainfrom
refactor/input-orientation
Jun 16, 2026
Merged

Input: name the label-layout axis orientation, not variant#103
lifeiscontent merged 2 commits into
mainfrom
refactor/input-orientation

Conversation

@lifeiscontent

@lifeiscontent lifeiscontent commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Spun out of an audit of the component prop vocabulary. Input exposed:

variant: "vertical" | "horizontal"

but those values describe label placement (label above (vertical) or beside (horizontal) the control), which is an orientation, not a form/shape variant. ScrollArea already names this exact concept orientation (scroll-area/index.tsx), so spelling it variant on Input was an inconsistency in the system's axis vocabulary.

This renames the public prop (and the internal FieldLabelGroup / labelGroupVariants plumbing) to orientation; the values are unchanged. TextArea is vertical-only and exposes no such prop, so it just passes the renamed value through internally.

Breaking change

<Input variant="vertical" /> becomes <Input orientation="vertical" /> (same for horizontal). No other consumers in the repo.

Validation

  • vp check clean (format, lint, types)
  • Input stories pass across all theme projects (60 tests, incl. the per-theme axe a11y gate)

For design review

This is a vocabulary-consistency call, same family as the Toolbar elevation/density split (#97): name each axis for the concept it expresses and keep that name consistent across components. Happy to revert to variant if that's preferred.

Copilot AI review requested due to automatic review settings June 16, 2026 09:14
@lifeiscontent lifeiscontent self-assigned this Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

📚 Storybook preview: https://pr-103-propel-storybook.vamsi-906.workers.dev

Copilot AI left a comment

Copy link
Copy Markdown

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 standardizes the prop vocabulary for Input by renaming the label-placement axis from variant to orientation (keeping the same "vertical" | "horizontal" values), aligning it with terminology used elsewhere (e.g., ScrollArea).

Changes:

  • Rename the public Input prop variantorientation and update internal FieldLabelGroup / labelGroupVariants plumbing accordingly.
  • Update Storybook stories to use orientation instead of variant.
  • Update TextArea’s internal wiring to pass orientation="vertical" to the shared label group.

Reviewed changes

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

File Description
packages/propel/src/components/input/index.tsx Renames the public prop and threads orientation through the shared label/layout internals.
packages/propel/src/components/input/input.stories.tsx Updates all stories/args to use orientation instead of variant.

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

Comment thread packages/propel/src/components/input/index.tsx
@lifeiscontent lifeiscontent force-pushed the refactor/input-orientation branch from 1d930eb to 6dfd07d Compare June 16, 2026 10:19
`Input` exposed `variant: "vertical" | "horizontal"` — but those values
describe label placement (above vs. beside the control), i.e. an orientation,
not a form/shape variant. ScrollArea already names this exact concept
`orientation`, so calling it `variant` here was an inconsistency.

Rename the public prop and the internal `FieldLabelGroup` / `labelGroupVariants`
plumbing to `orientation` (values unchanged). TextArea is vertical-only and
takes no such prop, so it's unaffected beyond passing the renamed value through.

Breaking: `<Input variant="vertical|horizontal">` -> `<Input orientation="...">`.
Copilot AI review requested due to automatic review settings June 16, 2026 12:59
@lifeiscontent lifeiscontent force-pushed the refactor/input-orientation branch from 6dfd07d to d766af9 Compare June 16, 2026 12:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

@lifeiscontent lifeiscontent enabled auto-merge (squash) June 16, 2026 17:18
@lifeiscontent lifeiscontent merged commit 801ae1a into main Jun 16, 2026
2 checks passed
@lifeiscontent lifeiscontent deleted the refactor/input-orientation branch June 16, 2026 17:21
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.

3 participants