-
Notifications
You must be signed in to change notification settings - Fork 676
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
[CMSP-695] WordPress 6.5 font library documentation and behavior #8867
Conversation
Thanks @jazzsequence for thinking through these changes. I'll need to set aside some thinking time too! |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
|
||
The distinction between the two approaches for handling fonts depends what works best for your workflow and whether you consider your fonts to be handled more like media files or more like themes and plugins. | ||
|
||
**If you consider fonts to be more like media files**, use the default Pantheon behavior added in our `mu-plugin`. This makes it easier to _install fonts onto production sites_ but perhaps more difficult to _synchronize_ those fonts on the lower environments (test and dev). |
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.
Using the default Pantheon filter, do fonts move between environments with a "clone files" workflow as expected?
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.
There are a few things I need to test. That's one. I also have a couple open questions that I posted in #core-editor
Slack: https://wordpress.slack.com/archives/C02QB2JS7/p1707937998405009
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 smashed that subscribe button for more jazzsequence gutenberg goodness.
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.
Here's what I'm seeing:
- Install font on live site
- Pull Live db down to Dev and sync files
- The font appears in the font manager but is not active
- Clicking into the font, selecting it and clicking update activates it
So, to answer your question, it does appear that they are pulled down when you clone the DB and files (I suspect you would need to clone the DB and files in order to get them), but there is an additional step to actually use them on the lower environment you pulled down to. I will update the doc.
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.
And, to be clear, I think the "active" value is similar to Plugin/Theme "activation", meaning it's there it's just not "available". It's similar, I believe, to the fact that when I cloned down my DB and files from Live to Dev, my FSE theme was active, but the specific theme style that I was using on Live was not selected on Dev.
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.
it's curious that activation status doesn't carry through db clone the way plugin activation status would.
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.
Yeah, I'm not sure what this tells me exactly, because surely these settings are stored in the database somewhere, but whatever the full site editor is doing with styles, it's doing the same thing with fonts. ¯\_(ツ)_/¯
Giving this a +1 - I think the approach makes sense. Treat it like WP does (generic upload) by default but with the option to switch to version controlled approach if desired. |
I'll offer that I think of a font as the latter, because I'm not sure how one would make use of an uploaded font without also modifying the theme file (other than making the change with inline styles but in that case one could also reference a font asset inline as a generic upload as well). |
If it helps to contextualize the feature, the Font Library is built into the Full Site Editor -- meaning that fonts and styles, while informed by the theme, are independent of the theme. The idea is that you could download (or build) a theme that's compatible with FSE and that theme might give you 4 fonts to work with. But you don't like those fonts for whatever reason, and you want to use one that you've either previously uploaded or are uploading (or installing from Google) new. That font could then be activated next year when you switch to the Twenty Twenty Five theme (or whatever). Themes can use the Font Library to install/download their own fonts via the API it adds as well, but the Font Library/management aspect of it is kind of independent of the theme. |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
source/content/guides/wordpress-configurations/07-wordpress-font-library.md
Outdated
Show resolved
Hide resolved
source/content/guides/wordpress-configurations/07-wordpress-font-library.md
Outdated
Show resolved
Hide resolved
source/content/guides/wordpress-configurations/07-wordpress-font-library.md
Outdated
Show resolved
Hide resolved
source/content/guides/wordpress-configurations/07-wordpress-font-library.md
Outdated
Show resolved
Hide resolved
source/content/guides/wordpress-configurations/07-wordpress-font-library.md
Show resolved
Hide resolved
Co-authored-by: Phil Tyler <[email protected]>
Co-authored-by: Phil Tyler <[email protected]>
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
1 similar comment
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
so we can publish this page sooner
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
Last update before I think we're good to go with this: I've updated the PR to remove the release note. I'll be writing up a release note separately for WordPress 6.5 so I will include the Font Library stuff in that. Some of the logic has changed (again) since this was first drafted: now default WordPress core behavior is if the Finally, the infinite loop bug when using |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
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.
LGTM, prefer to move the unrelated release note out though.
source/content/guides/wordpress-configurations/07-wordpress-font-library.md
Outdated
Show resolved
Hide resolved
source/releasenotes/2024-03-11-pantheon-advanced-page-cache-1.5.0.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Phil Tyler <[email protected]>
Co-authored-by: Phil Tyler <[email protected]>
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-8867-documentation.appa.pantheon.site |
* add draft release notes for WP 6.5 font library * add a guide under WordPress Configuration that talks about the WP Font Library * rename the release note with the expected release date * remove nonfunctional links * add g'berg issue * update notes to maintain consistency * update publish date * add troubleshooting info if the FS is not writeable * some copy changes * fix image url * add new screenshots * update info about handling fonts like media files * update troubleshooting steps * add one more troubleshooting Q & A * specify in the admin * Be more clear that this only happens if you've changed the Pantheon setting Co-authored-by: Phil Tyler <[email protected]> * remove references to "restoring wp default behavior" * note how we prioritized our filter * add details to how 'active' fonts work * update copy about post type this was already noted in the considerations, so we don't need to explain it again here * simplify language Co-authored-by: Phil Tyler <[email protected]> * more simplification Co-authored-by: Phil Tyler <[email protected]> * clarify introductory paragraph * discuss (new) wp default behavior and why we're keeping our mu-plugin behavior * remove note, this is no longer an issue * update language about overriding our font_dir filter * add our G'berg issue for font handling for manual uploads * add link to more resources * remove release notes for wp 6.5 from this PR * remove link to release post (that doesn't exist) so we can publish this page sooner * add new plugin tag for PAPC release note * add a new release note for the MU plugin release * note when developing locally Co-authored-by: Phil Tyler <[email protected]> * remove unrelated release note update Co-authored-by: Phil Tyler <[email protected]> --------- Co-authored-by: Phil Tyler <[email protected]>
Summary
Release Notes - Release notes for WordPress 6.5 including documentation about the Font Library
WordPress Configuration Guide - Adds a new guide for using the WP Font Library, how our filter works and how to override it, and considerations about either approach.
Effect
The WordPress Font Library introduces a new type of asset to WordPress sites, fonts. This opens up fundamental questions about how best to make use of these assets. As an opinionated platform, our belief is that, on day one, the font library should just work. As such, we have introduced code in our
pantheon-mu-plugin
to change the default behavior of the WP Font Library such that the default location for fonts to be stored is a (writeable on Pantheon)wp-content/uploads/fonts/
directory. This diverges from the WP core functionality of storing them inwp-content/fonts
.In a version controlled platform, the underlying question to consider here is: Are fonts more like media files (e.g. "I don't care where they are written and I should be able to add them to my live site directly.") or are they more like plugins and themes (e.g. "I want to manage the fonts in use on my site and commit them to version control.")?
We have opted for the former (fonts are like media files) whilst allowing teams to restore the default functionality by overriding our choice.
This PR documents the change in WordPress core and our approach.
Remaining Work and Prerequisites
Dependencies and Timing
Release:
Post Launch
Do not remove - To be completed by the docs team upon merge:
/old-path/
=>/new-path/
(if applicable)