-
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
Global Styles: Add a typesets section to Typography #62539
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. |
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.
Could use a code gut-check but works.
Size Change: +440 B (+0.03%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
@jasmussen Just confirming, should it be "Typesets", "Font sets", "Font packs" (or other)? |
<div className="edit-site-global-styles-screen"> | ||
<VStack spacing={ 7 }> | ||
<Typeset /> | ||
<TypographyVariations title={ __( 'Presets' ) } /> |
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.
Let's name this "Typesets" instead of "Presets". (If we decide to use a different name other than "Typeset" we'll use that here).
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'm happy with Typesets or Typeset. Or Font sets and Font set.
hasFonts && ( | ||
<VStack spacing={ 2 }> | ||
<HStack justify="space-between"> | ||
<Subtitle level={ 3 }>{ __( 'Typeset' ) }</Subtitle> |
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.
For here, and line 45, let's use "Fonts" as these are the fonts applied within the typeset.
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.
@richtabor Has this change been covered? Was it to change "Typeset" to "Fonts"?
{ !! modalTabOpen && ( | ||
<FontLibraryModal | ||
onRequestClose={ () => setModalTabOpen( null ) } | ||
defaultTabId={ modalTabOpen } | ||
/> | ||
) } |
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'm thinking these may work better below the typesets, so when a typeset has more fonts it does not displace the typesets UI. And you decide on a typeset here, not necessarily the fonts for each.
{ allFontFamilies | ||
.map( ( font ) => font.name ) | ||
.join( ', ' ) } |
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.
Let's use the theme variation title if there is one. If not, fallback to the joined font families.
I updated this as per the feedback above, plus a few other changes. The description has been updated to match the latest version. |
packages/edit-site/src/components/global-styles/typeset-button.js
Outdated
Show resolved
Hide resolved
packages/edit-site/src/components/global-styles/typeset-button.js
Outdated
Show resolved
Hide resolved
packages/edit-site/src/components/global-styles/typeset-button.js
Outdated
Show resolved
Hide resolved
packages/edit-site/src/components/global-styles/screen-typeset.js
Outdated
Show resolved
Hide resolved
Thanks for the review and fixes @mikachan. This is looking good to me now. |
Thanks @scruffian! I'm seeing the |
Only show typesets if there are fonts
Co-authored-by: Sarah Norris <[email protected]>
Co-authored-by: Sarah Norris <[email protected]>
Co-authored-by: Sarah Norris <[email protected]>
I want to undo some of those recent changes. #63503 |
These test failures turned out to be unrelated to these buttons, so I think these button changes are fine to handle in a separate PR. All tests are passing in this PR and the changes are working well locally for me 👍 |
I'm seeing this in Gutenberg trunk after merging this PR. I don't think this is the intended behaviour. It seems like typesets is just rendering the list of the installed fonts and not the font families variations: Screencast.from.25-07-24.10.28.47.webmIssue submitted: #63940 |
Hey @scruffian 👋 Would you be able to help write a dev note for this for the 6.7 release? We are planning to have this as part of a larger Miscellaneous Editor Updates note. We are hoping to get all drafts in by October 13th to leave some time for reviews before the RC1. All Dev Notes get tracked in #65784 so feel free to leave a note there or ping me directly :) Please let us know if you can assist with that. Thanks in advance :) |
What?
Fixes #62156.
Adds a new "Typesets" screen in which to show typography presets.
Why?
If there are a lot of typography presets the list will get very long, so it's better to show them on a separate screen.
How?
Testing Instructions
Screenshots or screencast