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

Typography Panel: Use simple labels #60886

Merged
merged 2 commits into from
Apr 19, 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
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export default function TypographyPanel( {
>
{ hasFontFamilyEnabled && (
<ToolsPanelItem
label={ __( 'Font family' ) }
label={ __( 'Font' ) }
hasValue={ hasFontFamily }
onDeselect={ resetFontFamily }
isShownByDefault={ defaultControls.fontFamily }
Expand All @@ -363,7 +363,7 @@ export default function TypographyPanel( {
) }
{ hasFontSizeEnabled && (
<ToolsPanelItem
label={ __( 'Font size' ) }
label={ __( 'Size' ) }
hasValue={ hasFontSize }
onDeselect={ resetFontSize }
isShownByDefault={ defaultControls.fontSize }
Expand Down Expand Up @@ -440,14 +440,14 @@ export default function TypographyPanel( {
{ hasTextColumnsControl && (
<ToolsPanelItem
className="single-column"
label={ __( 'Text columns' ) }
label={ __( 'Columns' ) }
hasValue={ hasTextColumns }
onDeselect={ resetTextColumns }
isShownByDefault={ defaultControls.textColumns }
panelId={ panelId }
>
<NumberControl
label={ __( 'Text columns' ) }
label={ __( 'Columns' ) }
max={ MAX_TEXT_COLUMNS }
min={ MIN_TEXT_COLUMNS }
onChange={ setTextColumns }
Expand All @@ -461,7 +461,7 @@ export default function TypographyPanel( {
{ hasTextDecorationControl && (
<ToolsPanelItem
className="single-column"
label={ __( 'Text decoration' ) }
label={ __( 'Decoration' ) }
hasValue={ hasTextDecoration }
onDeselect={ resetTextDecoration }
isShownByDefault={ defaultControls.textDecoration }
Expand All @@ -478,7 +478,7 @@ export default function TypographyPanel( {
{ hasWritingModeControl && (
<ToolsPanelItem
className="single-column"
label={ __( 'Text orientation' ) }
label={ __( 'Orientation' ) }
hasValue={ hasWritingMode }
onDeselect={ resetWritingMode }
isShownByDefault={ defaultControls.writingMode }
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/specs/editor/various/font-size-picker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ test.describe( 'Font Size Picker', () => {
<!-- /wp:paragraph -->` );

await page.click( 'role=button[name="Typography options"i]' );
await page.click( 'role=menuitem[name="Reset Font size"i]' );
await page.click( 'role=menuitem[name="Reset Size"i]' );
await page.keyboard.press( 'Escape' ); // Close the menu

await expect.poll( editor.getEditedPostContent )
Expand Down Expand Up @@ -266,7 +266,7 @@ test.describe( 'Font Size Picker', () => {
<!-- /wp:paragraph -->` );

await page.click( 'role=button[name="Typography options"i]' );
await page.click( 'role=menuitem[name="Reset Font size"i]' );
await page.click( 'role=menuitem[name="Reset Size"i]' );
await page.keyboard.press( 'Escape' ); // Close the menu

await expect.poll( editor.getEditedPostContent )
Expand Down
Loading