-
Notifications
You must be signed in to change notification settings - Fork 56
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
Handle font licenses when editing theme metadata #649
Conversation
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 see there are a few console.error
calls; I think we should implement proper error management instead.
Co-authored-by: Vicente Canales <[email protected]>
Co-authored-by: Vicente Canales <[email protected]>
I removed the error handling where it was not needed and added it in the function where the license text is requested. If getting the license fails, the UI will throw an alert. Until merging #648 this PR will display this error: Screencast.from.23-05-24.12.20.13.webmWhy an alert? Because the snackbar is behind the modal component and is not visible. As that problem is not easy to fix (reference: WordPress/gutenberg#52609) I think for now the alert is good enough. Screencast.from.23-05-24.12.02.53.webm |
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.
Looking good, although you'll probably have to update the branch with trunk
, since there's a new eslint rule enforcing the specification of which rule is being disabled when eslint-disable comments are used.
What
Why?
To avoid the need of collecting the font licesing information manually.
Font licenses are no longer automated with new Core Font Library functionality Font licenses are no longer automated with new Core Font Library functionality #525).
How
Calls the /font-families/ endpoint and process the data to create the fille the font credits text area.
Using a button to get the latest licenses has 2 benefits:
Screencast
This video features how the font licences can be updated for a theme.
Screencast.from.30-05-24.12.00.58.webm