From 943ab48008c4d51744ee92bbf2dc575c32011382 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Fri, 6 Jan 2023 13:24:04 +1100 Subject: [PATCH 1/6] Global styles: Update label of button that pushes local block styles to global styles --- .../edit-site/src/hooks/push-changes-to-global-styles/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js index 70b9fa1b02f8ea..bcf02f91fa84c9 100644 --- a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js +++ b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js @@ -137,7 +137,7 @@ function PushChangesToGlobalStylesControl( { disabled={ changes.length === 0 } onClick={ pushChanges } > - { __( 'Push changes to Global Styles' ) } + { __( 'Push changes globally' ) } ); From 1259d5aea19edeaefb0f90b11ff0a16ed8326535 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Mon, 9 Jan 2023 10:42:41 +1100 Subject: [PATCH 2/6] Update label to say Apply globally --- .../edit-site/src/hooks/push-changes-to-global-styles/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js index bcf02f91fa84c9..f4af25c545d47a 100644 --- a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js +++ b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js @@ -137,7 +137,7 @@ function PushChangesToGlobalStylesControl( { disabled={ changes.length === 0 } onClick={ pushChanges } > - { __( 'Push changes globally' ) } + { __( 'Apply globally' ) } ); From 06078da607a38c780a00ee1614c298565647d7ce Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Mon, 9 Jan 2023 11:50:46 +1100 Subject: [PATCH 3/6] Updates tests and snackbar notification text --- .../src/hooks/push-changes-to-global-styles/index.js | 2 +- .../specs/site-editor/push-to-global-styles.spec.js | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js index f4af25c545d47a..da82bd9b97e072 100644 --- a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js +++ b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js @@ -97,7 +97,7 @@ function PushChangesToGlobalStylesControl( { createSuccessNotice( sprintf( // translators: %s: Title of the block e.g. 'Heading'. - __( 'Pushed styles to all %s blocks.' ), + __( 'Applied styles to all %s blocks.' ), getBlockType( name ).title ), { diff --git a/test/e2e/specs/site-editor/push-to-global-styles.spec.js b/test/e2e/specs/site-editor/push-to-global-styles.spec.js index ce854f476e4f9d..709efbf397246b 100644 --- a/test/e2e/specs/site-editor/push-to-global-styles.spec.js +++ b/test/e2e/specs/site-editor/push-to-global-styles.spec.js @@ -59,7 +59,7 @@ test.describe( 'Push to Global Styles button', () => { // Push button should be disabled await expect( page.getByRole( 'button', { - name: 'Push changes to Global Styles', + name: 'Apply globally', } ) ).toBeDisabled(); @@ -69,27 +69,25 @@ test.describe( 'Push to Global Styles button', () => { // Push button should now be enabled await expect( page.getByRole( 'button', { - name: 'Push changes to Global Styles', + name: 'Apply globally', } ) ).toBeEnabled(); // Press the Push button - await page - .getByRole( 'button', { name: 'Push changes to Global Styles' } ) - .click(); + await page.getByRole( 'button', { name: 'Apply globally' } ).click(); // Snackbar notification should appear await expect( page.getByRole( 'button', { name: 'Dismiss this notice', - text: 'Pushed styles to all Heading blocks.', + text: 'Applied styles to all Heading blocks.', } ) ).toBeVisible(); // Push button should be disabled again await expect( page.getByRole( 'button', { - name: 'Push changes to Global Styles', + name: 'Apply globally', } ) ).toBeDisabled(); From 337109a0cbc61fdeee023b203289da8e94ef33f6 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Tue, 10 Jan 2023 10:13:57 +1100 Subject: [PATCH 4/6] Update help text and snackbar text --- .../src/hooks/push-changes-to-global-styles/index.js | 4 ++-- test/e2e/specs/site-editor/push-to-global-styles.spec.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js index da82bd9b97e072..9769510db5f0cd 100644 --- a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js +++ b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js @@ -97,7 +97,7 @@ function PushChangesToGlobalStylesControl( { createSuccessNotice( sprintf( // translators: %s: Title of the block e.g. 'Heading'. - __( 'Applied styles to all %s blocks.' ), + __( '%s styles updated.' ), getBlockType( name ).title ), { @@ -124,7 +124,7 @@ function PushChangesToGlobalStylesControl( { help={ sprintf( // translators: %s: Title of the block e.g. 'Heading'. __( - 'Move this block’s typography, spacing, dimensions, and color styles to all %s blocks.' + 'Apply this block’s typography, spacing, dimensions, and color styles to all %s blocks.' ), getBlockType( name ).title ) } diff --git a/test/e2e/specs/site-editor/push-to-global-styles.spec.js b/test/e2e/specs/site-editor/push-to-global-styles.spec.js index 709efbf397246b..26d86add4c0ce3 100644 --- a/test/e2e/specs/site-editor/push-to-global-styles.spec.js +++ b/test/e2e/specs/site-editor/push-to-global-styles.spec.js @@ -80,7 +80,7 @@ test.describe( 'Push to Global Styles button', () => { await expect( page.getByRole( 'button', { name: 'Dismiss this notice', - text: 'Applied styles to all Heading blocks.', + text: 'Heading styles updated.', } ) ).toBeVisible(); From 3ec716120025903127dd5cb7c179644d01f5cf39 Mon Sep 17 00:00:00 2001 From: James Koster Date: Tue, 10 Jan 2023 12:10:30 +0000 Subject: [PATCH 5/6] Snackbar label --- .../edit-site/src/hooks/push-changes-to-global-styles/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js index 9769510db5f0cd..6d29de4fdc9eed 100644 --- a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js +++ b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js @@ -97,7 +97,7 @@ function PushChangesToGlobalStylesControl( { createSuccessNotice( sprintf( // translators: %s: Title of the block e.g. 'Heading'. - __( '%s styles updated.' ), + __( '%s styles applied.' ), getBlockType( name ).title ), { From c4442131829f174189dff5fe8dca732b6d633dc4 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Wed, 11 Jan 2023 10:03:39 +1100 Subject: [PATCH 6/6] Update test text for snackbar to match --- test/e2e/specs/site-editor/push-to-global-styles.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/specs/site-editor/push-to-global-styles.spec.js b/test/e2e/specs/site-editor/push-to-global-styles.spec.js index 26d86add4c0ce3..7e9d3a07807f1c 100644 --- a/test/e2e/specs/site-editor/push-to-global-styles.spec.js +++ b/test/e2e/specs/site-editor/push-to-global-styles.spec.js @@ -80,7 +80,7 @@ test.describe( 'Push to Global Styles button', () => { await expect( page.getByRole( 'button', { name: 'Dismiss this notice', - text: 'Heading styles updated.', + text: 'Heading styles applied.', } ) ).toBeVisible();