-
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
Font Library Modal: Remove some contexts #62042
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. |
Size Change: +77 B (0%) Total Size: 1.74 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.
Thanks for working on this, @t-hamano! This is a great refactor, and a good step towards being able to open the font modal via the command palette.
This is working well in my testing:
- Can open and close font library modal ✅
- Fonts can be uploaded and installed successfully ✅
- Can navigate between the modal tabs ✅
- Can deactivate and delete a font successfully ✅
I noticed there were two small merge conflicts, so I've gone ahead and resolved them. Please check c25aab0 and 4911cb8 look correct. Otherwise, I think this is good to bring in!
Flaky tests detected in 4911cb8. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9305806816
|
@mikachan Thanks for the review! |
* Font Library Modal: Remove some contexts * Add unlock back to installed-fonts.js --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mikachan <mikachan@git.wordpress.org>
* Font Library Modal: Remove some contexts * Add unlock back to installed-fonts.js --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mikachan <mikachan@git.wordpress.org>
Part of #58428
What?
This PR removes the following context from the font library:
themeFonts
baseThemeFonts
customFonts
fontFamiliesHasChanges
hasResolvedLibrary
(This was never used in the first place)Why?
Aims to remove the context completely and trigger the font library modal via the command palette.
How?
This PR is the first effort for #58428. I removed relatively simple processing from the context and implemented it ad hoc in each component.
Testing Instructions
The font library behavior should be exactly the same as before, but in particular test the following: