Input: name the label-layout axis orientation, not variant#103
Merged
Conversation
|
📚 Storybook preview: https://pr-103-propel-storybook.vamsi-906.workers.dev |
There was a problem hiding this comment.
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
Inputpropvariant→orientationand update internalFieldLabelGroup/labelGroupVariantsplumbing accordingly. - Update Storybook stories to use
orientationinstead ofvariant. - Update
TextArea’s internal wiring to passorientation="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.
1d930eb to
6dfd07d
Compare
`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="...">`.
6dfd07d to
d766af9
Compare
bhaveshraja
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spun out of an audit of the component prop vocabulary.
Inputexposed:but those values describe label placement (label above (
vertical) or beside (horizontal) the control), which is an orientation, not a form/shapevariant.ScrollAreaalready names this exact conceptorientation(scroll-area/index.tsx), so spelling itvarianton Input was an inconsistency in the system's axis vocabulary.This renames the public prop (and the internal
FieldLabelGroup/labelGroupVariantsplumbing) toorientation; the values are unchanged.TextAreais 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 forhorizontal). No other consumers in the repo.Validation
vp checkclean (format, lint, types)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
variantif that's preferred.