-
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
Block-Editor: Enhance FontFamily Component #57430
base: trunk
Are you sure you want to change the base?
Block-Editor: Enhance FontFamily Component #57430
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @Utsav-Ladani! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
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.
Great work!
I have enabled Jetpack Google Fonts (beta) to have a scrollable dropdown of fonts in the Font Family field. It works great, having a consistent experience across browsers.
Firefox:
https://github.com/WordPress/gutenberg/assets/3832570/8a792ef9-d322-4514-a66a-253d8bbc2ed6
Chrome:
https://github.com/WordPress/gutenberg/assets/3832570/5faa986f-c4d2-48d0-8cc2-39cad2813512
@Utsav-Ladani can you sync PR with trunk? |
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @JuanLucha. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
When we have too many fonts, SelectControl shows font list whose height is equal to screen height in the Chrome. But in Firefox height is not that much larger. SelectControl uses default HTML select interface, however CustomSelectControl uses custom interface, so user can see scrollable list instead of taller list. This way we can enhacne the UI Fixes WordPress#57301.
af6129f
to
0470bb5
Compare
@akasunil done |
What?
FontFamily
component in theblock-editor
package.Why?
Chrome
becauseSelectControl
uses the<select>
HTML tag.CustomSelectControl
then the list will not become taller, it get a scrollbar if necessary and our UI stays the same for all different browsers.How?
SelectControl
withCustomSelectControl
to solve the issue.CustomSelectControl
uses a custom interface for the select menu, however,SelectControl
uses the default<select>
tag which is different in all browsers.Testing Instructions
Screenshots
Related issue