-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
CustomSelectControl: Add flag for larger default size #39401
Conversation
43befb2
to
ff4b0bd
Compare
Size Change: +139 B (0%) Total Size: 1.21 MB
ℹ️ View Unchanged
|
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.
Code changes LGTM, and thank you for refactoring the Story to use Controls!
I'll let you and @jasmussen discuss and refine the component's spacing!
In that light, do we need to include 36px in the flag at all? I.e. could it simply be called
__nextDefaultSize
? While the current plan is to standardize all on 36px and have 40px as an option, we could go with__nextDefaultSize
and__nextLargeSize
instead, and it'd be a bit more agnostic to the values.
I don't have a strong opinion here, both options sound good to me,
'components-custom-select-control__button', | ||
{ 'is-next-36px-default-size': __next36pxDefaultSize } | ||
), | ||
isSmall: ! __next36pxDefaultSize, |
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.
Love it when we rely on composability instead of style overrides
Thanks for the reviews!
Good question. It isn't pretty, but the reason I prefer including a specific pixel value here is twofold:
Do you have any concerns about this diverging from the
Good to know. I've split out a separate issue (#39425) so we can change all of them at once. |
Excellent eye for detail. Thank you. It's my sense that we'd want to standardize on 16px padding left and right for all of these 36px items, including Buttons (barring any responsive changes we might make). That's perhaps the biggest benefit this effort has: unifying all these drifted values across a single grid. I'd think it okay to not do those changes all at once: in general we should avoid stacking dropdows and buttons vertically, and the places we do need love regardless. |
Gotcha, I've split out the As for this PR, I went ahead and changed it to the wider padding (126c3d9). I'll deal with the right side padding when I fix the chevron problem (#39400). With that, I think all feedback has been accounted for and this PR is ready for final approval 🙏 |
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.
LGTM 🚀
- Horizontal padding has been adjusted to
16px
in this PR - Follow-ups:
- Chevron icon inconsistency tracked separately in CustomSelectControl: Make
chevronDown
consistent with SelectControl #39400 - Button padding inconsistency tracked separately in Button: Increase horizontal paddings to 16px #39431
- Border color inconsistencies tracked separately in Components: Lighten border colors to
gray-600
#39425
- Chevron icon inconsistency tracked separately in CustomSelectControl: Make
* CustomSelectControl: Add flag for larger default size * Migrate stories * Add changelog entry * Increase paddings to 16px * Fixup changelog
Part of #39397
What?
Adds an internal
__next36pxDefaultSize
feature flag prop to introduce the larger default size forCustomSelectControl
.Why?
In preparation for standardizing the default sizes to 36px height.
How?
Following the procedure outlined in #39397, conditional styles have been added to enlarge the height and paddings. The font size is also enlarged to be consistent with
SelectControl
.The inconsistent chevron (#39400) will be addressed separately.
@jasmussen How do the paddings feel?
Testing Instructions
npm run storybook:dev
and see the stories forCustomSelectControl
.__next36pxDefaultSize
prop.Screenshots
__next36pxDefaultSize
= false__next36pxDefaultSize
= trueUpdated with 16px padding: