-
Notifications
You must be signed in to change notification settings - Fork 4k
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
base: trunk
Are you sure you want to change the base?
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: +344 B (+0.02%) 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.
{ !! 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. |
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