From d841657bf5b844dedbeb5af20fb0b80a54cf32c7 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Sat, 2 Jul 2022 16:37:51 +0200 Subject: [PATCH 1/4] Update text --- .../block-editor/src/components/block-alignment-control/ui.js | 4 ++-- .../src/components/block-alignment-control/ui.native.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-editor/src/components/block-alignment-control/ui.js b/packages/block-editor/src/components/block-alignment-control/ui.js index 4fe47568b09d9..3cf8b63f6f2ed 100644 --- a/packages/block-editor/src/components/block-alignment-control/ui.js +++ b/packages/block-editor/src/components/block-alignment-control/ui.js @@ -52,8 +52,8 @@ function BlockAlignmentUI( { icon: activeAlignmentControl ? activeAlignmentControl.icon : defaultAlignmentControl.icon, - label: __( 'Align' ), - toggleProps: { describedBy: __( 'Change alignment' ) }, + label: __( 'Change alignment or width' ), + toggleProps: { describedBy: __( 'Change alignment or width' ) }, }; const extraProps = isToolbar ? { diff --git a/packages/block-editor/src/components/block-alignment-control/ui.native.js b/packages/block-editor/src/components/block-alignment-control/ui.native.js index 8faa8fe3e0d59..8fdbfc3f17783 100644 --- a/packages/block-editor/src/components/block-alignment-control/ui.native.js +++ b/packages/block-editor/src/components/block-alignment-control/ui.native.js @@ -77,7 +77,7 @@ function BlockAlignmentUI( { }; } ), popoverProps: POPOVER_PROPS, - toggleProps: { describedBy: __( 'Change alignment' ) }, + toggleProps: { describedBy: __( 'Change alignment or width' ) }, }; return ; From b3fcc3653ab0858fa3e50ffc51494645ed0e9e0f Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Sat, 2 Jul 2022 17:38:08 +0200 Subject: [PATCH 2/4] Update native files and snapshot --- .../block-alignment-control/test/__snapshots__/index.js.snap | 4 ++-- .../components/block-alignment-control/test/index.native.js | 4 ++-- .../src/components/block-alignment-control/ui.native.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/block-editor/src/components/block-alignment-control/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-alignment-control/test/__snapshots__/index.js.snap index 17f5318b43669..8787c52275142 100644 --- a/packages/block-editor/src/components/block-alignment-control/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/block-alignment-control/test/__snapshots__/index.js.snap @@ -73,7 +73,7 @@ exports[`BlockAlignmentUI should match snapshot 1`] = ` } isCollapsed={true} - label="Align" + label="Change alignment or width" popoverProps={ Object { "isAlternate": true, @@ -81,7 +81,7 @@ exports[`BlockAlignmentUI should match snapshot 1`] = ` } toggleProps={ Object { - "describedBy": "Change alignment", + "describedBy": "Change alignment or width", } } /> diff --git a/packages/block-editor/src/components/block-alignment-control/test/index.native.js b/packages/block-editor/src/components/block-alignment-control/test/index.native.js index 64a9f3bfce1f6..4d78271ad784a 100644 --- a/packages/block-editor/src/components/block-alignment-control/test/index.native.js +++ b/packages/block-editor/src/components/block-alignment-control/test/index.native.js @@ -13,7 +13,7 @@ it( 'should call onChange with undefined when the control is already active', () const screen = render( ); - const alignButton = screen.getByA11yLabel( 'Align' ); + const alignButton = screen.getByA11yLabel( 'Change alignment or width' ); fireEvent.press( alignButton ); const rightAlignmentButton = screen.getByA11yLabel( 'Align right' ); fireEvent.press( rightAlignmentButton ); @@ -27,7 +27,7 @@ it( 'should call onChange with alignment value when the control is inactive', () const screen = render( ); - const alignButton = screen.getByA11yLabel( 'Align' ); + const alignButton = screen.getByA11yLabel( 'Change alignment or width' ); fireEvent.press( alignButton ); const centerAlignmentButton = screen.getByA11yLabel( 'Align center' ); fireEvent.press( centerAlignmentButton ); diff --git a/packages/block-editor/src/components/block-alignment-control/ui.native.js b/packages/block-editor/src/components/block-alignment-control/ui.native.js index 8fdbfc3f17783..663d73b5359e3 100644 --- a/packages/block-editor/src/components/block-alignment-control/ui.native.js +++ b/packages/block-editor/src/components/block-alignment-control/ui.native.js @@ -47,7 +47,7 @@ function BlockAlignmentUI( { : toolbarUIComponent; const commonProps = { - label: __( 'Align' ), + label: __( 'Change alignment or width' ), }; const extraProps = isBottomSheetControl ? { From 7bb12fce43c063db3ce54b5afe511a5bee04d28c Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Sat, 2 Jul 2022 17:50:52 +0200 Subject: [PATCH 3/4] Update index.native.js --- packages/block-library/src/embed/test/index.native.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/embed/test/index.native.js b/packages/block-library/src/embed/test/index.native.js index d3ef251dab9a9..136b7a069fa45 100644 --- a/packages/block-library/src/embed/test/index.native.js +++ b/packages/block-library/src/embed/test/index.native.js @@ -668,7 +668,9 @@ describe( 'Embed block', () => { // Open alignment options. fireEvent.press( - await waitFor( () => getByA11yLabel( 'Align' ) ) + await waitFor( () => + getByA11yLabel( 'Change alignment or width' ) + ) ); // Select alignment option. From 80bc434cb053564d96b038a335b4ea3928a40d29 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Mon, 4 Jul 2022 07:39:57 +0200 Subject: [PATCH 4/4] Update align-hook.test.js --- packages/e2e-tests/specs/editor/plugins/align-hook.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/e2e-tests/specs/editor/plugins/align-hook.test.js b/packages/e2e-tests/specs/editor/plugins/align-hook.test.js index 9246144d810e0..57f427718fc99 100644 --- a/packages/e2e-tests/specs/editor/plugins/align-hook.test.js +++ b/packages/e2e-tests/specs/editor/plugins/align-hook.test.js @@ -151,7 +151,7 @@ describe( 'Align Hook Works As Expected', () => { it( 'Shows no alignment buttons on the alignment toolbar', async () => { await insertBlock( BLOCK_NAME ); const CHANGE_ALIGNMENT_BUTTON_SELECTOR = - '.block-editor-block-toolbar .components-dropdown-menu__toggle[aria-label="Align"]'; + '.block-editor-block-toolbar .components-dropdown-menu__toggle[aria-label="Change alignment or width"]'; const changeAlignmentButton = await page.$( CHANGE_ALIGNMENT_BUTTON_SELECTOR );