-
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
Move the switch to enable new Font Library to Experiments setting #54315
Conversation
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
This reverts commit 43dae16.
Warning: Type of PR label mismatch 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. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/experimental/editor-settings.php ❔ lib/experiments-page.php ❔ lib/load.php |
Thanks for adding this, I have't checkout and test it yet but overall looks good and useful. Please rename the option to "Font Library" because "Font API" is another area of the code in charge of something else and soon it will be deprecated. |
Size Change: +8 B (0%) Total Size: 1.61 MB
ℹ️ View Unchanged
|
I have updated the names. |
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 is working great on my end. Thanks for working on this.
My only concern is this:
As far as I know, the Gutenberg experiments page is only available when you have Gutenberg plugins installed and activated. In consequence, this switch will be only available when using Gutenberg. At the same time, the Font Library feature is intended to be in WordPress core, so we won't be able to turn the feature on/off while using just core.
For those reasons, I'm not 100% sure that we should merge this. What do you think of an alternative like continuing to use the FONT_LIBRARY_ENABLE
to switch the feature on/off in the backend and add a check in the frontend too as you made in:
{ window.__experimentalFontLibrary && <FontFamilies /> } |
Sure, that's reasonable. Do you think it would hurt anything to use the same interface to enable the feature via UI? I'm not sure what the timeline is expected to be for it being defaulted to ON; That may inform if its even worth having a UI way to do that... |
This is intended to be working by default on WordPress core 6.4 release. |
I'm not sure what interface you are referring to. |
Flaky tests detected in 4a6cfe9. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6146872944
|
Closing this PR as outdated. |
What?
Moves the switch to turn on/off the Fonts API to the Gutenberg Experiments page.
Also disables the interface when disabled.