Skip to content
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

Revert "Font Library: Group fonts by source (#63211)" #65590

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 5 additions & 28 deletions packages/edit-site/src/components/global-styles/font-families.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { __, _x } from '@wordpress/i18n';
import { __ } from '@wordpress/i18n';
import {
__experimentalText as Text,
__experimentalItemGroup as ItemGroup,
Expand Down Expand Up @@ -61,14 +61,9 @@ function FontFamilies() {
) }

<VStack spacing={ 4 }>
{ themeFonts.length > 0 && (
<VStack>
<Subtitle level={ 3 }>
{
/* translators: Heading for a list of fonts provided by the theme. */
_x( 'Theme', 'font source' )
}
</Subtitle>
{ [ ...themeFonts, ...customFonts ].length > 0 && (
<>
<Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>
<ItemGroup size="large" isBordered isSeparated>
{ themeFonts.map( ( font ) => (
<FontFamilyItem
Expand All @@ -77,25 +72,7 @@ function FontFamilies() {
/>
) ) }
</ItemGroup>
</VStack>
) }
{ customFonts.length > 0 && (
<VStack>
<Subtitle level={ 3 }>
{
/* translators: Heading for a list of fonts installed by the user. */
_x( 'Custom', 'font source' )
}
</Subtitle>
<ItemGroup size="large" isBordered isSeparated>
{ customFonts.map( ( font ) => (
<FontFamilyItem
key={ font.slug }
font={ font }
/>
) ) }
</ItemGroup>
</VStack>
</>
) }
{ ! hasFonts && (
<VStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function ScreenTypography() {
<ScreenHeader
title={ __( 'Typography' ) }
description={ __(
'Typography styles and the application of those styles on site elements.'
'Available fonts, typographic styles, and the application of those styles.'
) }
/>
<div className="edit-site-global-styles-screen">
Expand Down
Loading