feat(ui-simple-select,ui-select): add layout prop to Select and Simpl…#2022
Merged
ToMESSKa merged 1 commit intoJun 24, 2025
Conversation
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new layout prop to both Select and SimpleSelect components, allowing labels to be rendered inline (beside the input) or stacked (above/below the input).
- Add
layout?: 'stacked' | 'inline'to props definitions, prop-types, and allowed props lists - Wire the new
layoutprop through component rendering - No behavioral changes beyond exposing layout choice
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/ui-simple-select/src/SimpleSelect/props.ts | Define and document new layout prop |
| packages/ui-simple-select/src/SimpleSelect/index.tsx | Destructure and forward layout to underlying Select |
| packages/ui-select/src/Select/props.ts | Define and document new layout prop |
| packages/ui-select/src/Select/index.tsx | Destructure and forward layout into TextInput props |
Comments suppressed due to low confidence (3)
packages/ui-simple-select/src/SimpleSelect/props.ts:240
- Consider adding unit tests for the new
layoutprop to ensure thatstackedandinlinemodes render correctly in SimpleSelect.
layout?: 'stacked' | 'inline'
packages/ui-select/src/Select/props.ts:264
- Consider adding unit tests for the new
layoutprop to ensure thatstackedandinlinemodes render correctly in Select.
layout?: 'stacked' | 'inline'
packages/ui-select/src/Select/index.tsx:20
- Add a default value for the
layoutprop (e.g.,layout: 'stacked') indefaultPropsso consumers get a consistent default layout without needing to pass it explicitly.
static defaultProps = {
matyasf
requested changes
Jun 20, 2025
Collaborator
There was a problem hiding this comment.
better text suggestion (use the same for SimpleSelect too):
In stacked mode the input is below the label.
In inline mode the input is to the right/left (depending on text direction) of the label, and the layout will look like stacked for small screens
…eSelect INSTUI-4482
0221b86 to
98e63f2
Compare
matyasf
approved these changes
Jun 24, 2025
balzss
approved these changes
Jun 24, 2025
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.
…eSelect
INSTUI-4482
ISUUE:
TEST PLAN: