-
Notifications
You must be signed in to change notification settings - Fork 4.7k
FontSizePicker: Update hint text to match the design #44966
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3e4b976
FontSizePicker: Update hint text to match the design
noisysocks 14b4331
Add CustomSelectControl tests
noisysocks c069ae6
Add utils tests
noisysocks 018894f
Update FontSizePicker tests
noisysocks 07c4151
Update E2E tests
noisysocks 5fc18a8
Update CHANGELOG.md
noisysocks 1851fe5
Add __experimentalShowSelectedHint to storybook
noisysocks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /** | ||
| * WordPress dependencies | ||
| */ | ||
| import { __ } from '@wordpress/i18n'; | ||
|
|
||
| /** | ||
| * List of T-shirt abbreviations. | ||
| * | ||
| * When there are 5 font sizes or fewer, we assume that the font sizes are | ||
| * ordered by size and show T-shirt labels. | ||
| */ | ||
| export const T_SHIRT_ABBREVIATIONS = [ | ||
| /* translators: S stands for 'small' and is a size label. */ | ||
| __( 'S' ), | ||
| /* translators: M stands for 'medium' and is a size label. */ | ||
| __( 'M' ), | ||
| /* translators: L stands for 'large' and is a size label. */ | ||
| __( 'L' ), | ||
| /* translators: XL stands for 'extra large' and is a size label. */ | ||
| __( 'XL' ), | ||
| /* translators: XXL stands for 'extra extra large' and is a size label. */ | ||
| __( 'XXL' ), | ||
| ]; | ||
|
|
||
| /** | ||
| * List of T-shirt names. | ||
| * | ||
| * When there are 5 font sizes or fewer, we assume that the font sizes are | ||
| * ordered by size and show T-shirt labels. | ||
| */ | ||
| export const T_SHIRT_NAMES = [ | ||
| __( 'Small' ), | ||
| __( 'Medium' ), | ||
| __( 'Large' ), | ||
| __( 'Extra Large' ), | ||
| __( 'Extra Extra Large' ), | ||
| ]; |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
I obviously don't love adding yet another prop 😅
We've talked before about introducing
renderItemor something like that which should negate the need for this. I figure let's add the dumb prop for now and come back to this if/when we pick #41726 back up.CustomSelectControlis in need of a lot of love!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 looks like a reasonable compromise that we can remove once we're done reworking
CustomSelectControl. It should be ok to remove this prop in the near future before it makes its way into WordPress core.We are well aware of it! Unfortunately our low capacity and some unforeseen high priority tasks (i.e. fixing the high amount of regressions introduced by the
Popoverrefactor) caused some delays. We should be able to resume work on it very soon (maybe we can even start collaborating on it next week, if we find some time)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.
Just a quick request — can we add its associated control in Storybook?
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.
Let's!