-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
FormTokenField, ComboboxControl: Add opt-in prop for next 40px default size #50261
Conversation
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.
Extracted this into a utility function because we'll be doing this for at least 6 more components.
css` | ||
padding-top: ${ space( hasTokens ? 1 : 0.5 ) }; | ||
padding-bottom: ${ space( hasTokens ? 1 : 0.5 ) }; | ||
`; | ||
|
||
export const TokensAndInputWrapperFlex = styled( Flex )` | ||
padding: 5px ${ space( 1 ) }; |
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.
Not sure why this padding was uneven 🤷
Flaky tests detected in 53b7af2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4864382743
|
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.
This was a fun PR, thanks for sharing it. Very cool to see the style depractation mechanisms in action!
LGTM 🚀 🚢
For the dev note, see #46741 |
Warning: Type of PR label error To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. |
Part of #46741
What?
To the FormTokenField and ComboboxControl components,
__next40pxDefaultSize
prop to opt into the next 40px default size.__next36pxDefaultSize
as deprecated, and alias to the 40px prop.Why?
Of the components that have a
__next36pxDefaultSize
prop, these are the only two that don't yet have a 40px size variant available.How?
See inline comments.
Testing Instructions
Run
npm run storybook:dev
. For the FormTokenField and ComboboxControl stories:__next36pxDefaultSize
prop should log a deprecation warning to the devtools console.__next36pxDefaultSize
to true should change the component to the 40px size.__next40pxDefaultSize
to true should change the component to the 40px size. (If both props are defined, the__next40pxDefaultSize
prop wins.)Screenshots or screencast