-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(721): update select component scenarios - storybook #807
Conversation
You can preview these changes on: |
</> | ||
export const StorySelectDefault = () => ( | ||
<StorybookPage> | ||
<Block> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this block here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if I replace Block with StorybookCase. Change pushed
}} | ||
> | ||
export const StorySelectSize = () => ( | ||
<StorybookPage columns="1fr 1fr 1fr"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we leave this to defaults columns? This will not look good on mobile screens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change pushed
export const StorySelectSize = () => ( | ||
<StorybookPage columns="1fr 1fr 1fr"> | ||
<StorybookCase title="Small"> | ||
<Block> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with this block, don't thin is needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change pushed
stylePreset: 'labelOverrides', | ||
}} | ||
export const StorySelectWidth = () => ( | ||
<StorybookPage columns="auto auto"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should just use default columns most of the time ( they are 300px and auto flow ) even tho it does not match what's in Figma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change pushed
{items.map(item => ( | ||
<SelectOption key={item} value={item}> | ||
{item} | ||
</SelectOption> | ||
))} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we use this many times, what do you think of storing this in a const and re-using it in stories?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change pushed
2ad5578
to
806b4b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These style presets are not used anywhere as far I can see but are defined in the theme overrides: selectOptionCustom, labelOverrides, assistiveTextOverrides, customOutlineColor, customOutlineStyle, customOutlineWidth, customOutlineOffset
</Container> | ||
</> | ||
export const StorySelectHeight = () => ( | ||
<StorybookPage columns="auto auto auto"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have few more places with columns that might be worth checking if they are needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have removed all but one now
paddingBlock: 'space050', | ||
paddingInline: 'space050', | ||
typographyPreset: 'utilityButton010', | ||
stylePreset: 'selectOptionCustom', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selectOptionCustom is still defined in the theme above but is not used any more, can you update the theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change pushed
Change pushed |
closes #721
What
I have done:
I have tested manually:
Before:
After:
Who should review this PR:
How to test: