-
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
FontSizePicker: use CustomSelectControl V2 legacy adapter #63134
FontSizePicker: use CustomSelectControl V2 legacy adapter #63134
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
<Styled.SelectLabel | ||
store={ store } | ||
render={ | ||
hideLabelFromVision ? ( | ||
// @ts-expect-error `children` are passed via the render prop | ||
<VisuallyHidden as="label" /> | ||
) : undefined | ||
} | ||
> | ||
{ label } | ||
</Styled.SelectLabel> |
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.
Size Change: +683 B (+0.04%) Total Size: 1.76 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.
This tests well, looks good, and appears to be pretty straightforward as a change.
Happy to do another test when #63137 is merged.
cba82e1
to
d596eb6
Compare
Merged #63137 and rebased on top of latest |
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.
The main differences that I notice:
In my opinion:
I believe we can merge this PR, and address any potential further design feedback separately. |
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.
Looks good 👍 And agreed on your assessment of the minor style differences.
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.
Perfect, thanks for elaborating on the style differences 👍 🚀
…63134) * FontSizePicker: use CustomSelectControl V2 legacy adapter * CHANGELOG * Fix unit tests * Update e2e tests --- Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>
…63134) * FontSizePicker: use CustomSelectControl V2 legacy adapter * CHANGELOG * Fix unit tests * Update e2e tests --- Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>
What?
Part of #55023
Requires #63131 and #63137 to be merged first
Replace the V1
CustomSelectControl
with the V2 legacy adapter in theFontSizePicker
component.Why?
The goal is to ultimately replace the legacy V1 implementation entirely with the V2 legacy adapter. We're performing the migration gradually, and fixing any bugs / gaps as we go.
How?
combobox
role instead ofbutton
Testing Instructions
Note:
FontSizePicker
shows aCustomSelectControl
only when there are more than 5 predef font sizes for the use user to choose from. In the case of 5 or less predef font size, aToggleGroupControl
is shown.FontSizePicker
storybook examplestrunk
theme.json
file and make sure that there are 6 predef font sizes or moretrunk
cscv2.font.picker.global.styles.v1.mp4
cscv2.font.picker.global.styles.v2.mp4