Skip to content

Commit

Permalink
Typography Panel: Use simple labels (#60886)
Browse files Browse the repository at this point in the history
* Typography Panel: Use simple labels

* Fix e2e test
  • Loading branch information
t-hamano committed Apr 19, 2024
1 parent 96749de commit e8bbd2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
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

1 comment on commit e8bbd2e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in e8bbd2e.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8759711627
📝 Reported issues:

Please sign in to comment.