-
Notifications
You must be signed in to change notification settings - Fork 111
Move font family definitions into respective typography presets. #237
Conversation
Hey @jffng, we're nearing beta 1. Is this something that has to happen before that date? |
I don't think so, since the related Gutenberg issue is considered a bug. |
Preview changesYou can preview these changes by following the link below: I will update this comment with the latest preview links as you push more changes to this PR. Note The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions. |
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. |
I updated this branch incorporating the latest changes made on trunk. I moved all font family definitions that are not used in the default styles out of the main |
This screencast compares the behavior of
Both screens should look the same in terms of typography. The video shows that the fonts are loading correctly when defined in a style variations and typesets (#237) when WordPress/gutenberg#65019 is in place. Screencast.from.09-10-24.18.22.50.webm |
I merged the latest changes from I think the PR is in good shape for review. |
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.
Thank you. I've tested this saving each style variation / typography present and viewing in the front end, and it's working well. Code also looks good.
Screen.Recording.2024-10-22.at.12.33.03.mov
# Conflicts: # theme.json
I've just rebased after we got this PR merged, where we introduced variable fonts. There were some conflicts in @matiasbenedetto @carolinan @beafialho I'd appreciate it if you could look at this and confirm everything is working as expected. It is working as expected on my end. Thanks 🙌 |
To me this is a design decision, since it will change where the font families are available to be selected. |
I'm not sure if my testing is showing the right things, but here's what I noticed:
variation-sunrise.mp4variation-midnight.mp4
variation.mp4 |
@beafialho I had not even noticed that when you select the combined variations (theme style variations) the color palette and typography preset gets a visible outline. I did not know that was a thing. You are describing that when some variations are selected, the matching color palette and typography presets are not selected, and I can reproduce that even without this PR. So there might be a problem that is unrelated to the changes in this PR. |
I had not checked with proper eyes either @carolinan, but as I tested them now, I expected that to be the behaviour.
I also suspected that, but I also wasn't sure if it might be just this PR, since it was created way before the changes in #564 which improved the typography variations. |
Yes, I think it's the proper design decision. From my perspective, rendering all the fonts from all the style variations and letting the user select them for page elements doesn't make sense. The variations are meant to be alternative styles that could be replaced but not combined. A design with nine different font families is difficult to harmonize, and I don't think it is the idea we would like to implement. |
Thank you for clarifying @carolinan! As a designer, I have a preference for seeing all the font families displayed, regardless of the variation I'm using, for convenience but also logic of seeing all the fonts shipped with the theme in one list. However, I do see how displaying that list in the sidebar below the presets can be overwhelming and even lead to unwanted, less than ideal page/element specific settings. Since it is possible and easy to add Google Fonts and even upload them, which gives users the option of adding whatever font they want, I think this PR makes sense to be merged. |
Thank you all! I'm merging this one. |
What?
This PR moves the font family definitions to their respective typography preset files.
Needs WordPress/gutenberg#65019 to be merged to work as expected.
How?
theme.json
only includes 2 font families used in the default styles (Manrope and Fira Code).Why?
Fixes: #233