From e0b5916e05ebd98b7b35bb6aebdfe9880f71d892 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Thu, 16 Jun 2022 12:58:48 +0300 Subject: [PATCH 1/3] [Full Site Editing]: Update `clear customizations` copy for templates --- .../src/components/header/template-title/delete-template.js | 4 ++-- packages/edit-site/src/components/list/actions/index.js | 6 ++++-- .../components/sidebar/template-card/template-actions.js | 6 ++++-- packages/edit-site/src/components/template-details/index.js | 6 ++++-- .../src/components/template-details/template-areas.js | 4 +++- test/e2e/specs/site-editor/template-revert.spec.js | 6 ++++-- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/packages/edit-post/src/components/header/template-title/delete-template.js b/packages/edit-post/src/components/header/template-title/delete-template.js index 7eb72ad5aa5a6e..84593feec9c4d3 100644 --- a/packages/edit-post/src/components/header/template-title/delete-template.js +++ b/packages/edit-post/src/components/header/template-title/delete-template.js @@ -84,12 +84,12 @@ export default function DeleteTemplate() { } } info={ isRevertable - ? __( 'Restore template to default state' ) + ? __( 'Use the template as supplied by the theme' ) : undefined } > { isRevertable - ? __( 'Clear customizations' ) + ? __( 'Delete custom template' ) : __( 'Delete template' ) } { revertAndSaveTemplate(); onClose(); } } > - { __( 'Clear customizations' ) } + { __( 'Delete custom template' ) } ) } diff --git a/packages/edit-site/src/components/sidebar/template-card/template-actions.js b/packages/edit-site/src/components/sidebar/template-card/template-actions.js index 09208c03edf781..d9461975667f69 100644 --- a/packages/edit-site/src/components/sidebar/template-card/template-actions.js +++ b/packages/edit-site/src/components/sidebar/template-card/template-actions.js @@ -28,13 +28,15 @@ export default function Actions( { template } ) { { ( { onClose } ) => ( { revertTemplate( template ); onClose(); } } > - { __( 'Clear customizations' ) } + { __( 'Delete custom template' ) } ) } diff --git a/packages/edit-site/src/components/template-details/index.js b/packages/edit-site/src/components/template-details/index.js index 56141dc264dcd6..e2561a0300bdce 100644 --- a/packages/edit-site/src/components/template-details/index.js +++ b/packages/edit-site/src/components/template-details/index.js @@ -79,10 +79,12 @@ export default function TemplateDetails( { template, onClose } ) { - { __( 'Clear customizations' ) } + { __( 'Delete custom template' ) } ) } diff --git a/packages/edit-site/src/components/template-details/template-areas.js b/packages/edit-site/src/components/template-details/template-areas.js index f7bafc106d524b..1f9275f73e66f7 100644 --- a/packages/edit-site/src/components/template-details/template-areas.js +++ b/packages/edit-site/src/components/template-details/template-areas.js @@ -59,7 +59,9 @@ function TemplatePartItemMore( { { isTemplateRevertable( templatePart ) && ( { __( 'Clear customizations' ) } diff --git a/test/e2e/specs/site-editor/template-revert.spec.js b/test/e2e/specs/site-editor/template-revert.spec.js index 6a6ba6353a5e71..e141eec458536b 100644 --- a/test/e2e/specs/site-editor/template-revert.spec.js +++ b/test/e2e/specs/site-editor/template-revert.spec.js @@ -42,7 +42,7 @@ test.describe( 'Template Revert', () => { // The revert button isn't visible anymore. await expect( - page.locator( 'role=menuitem[name=/Clear customizations/i]' ) + page.locator( 'role=menuitem[name=/Delete custom template/i]' ) ).not.toBeVisible(); } ); @@ -279,7 +279,9 @@ class TemplateRevertUtils { async revertTemplate() { await this.page.click( 'role=button[name="Show template details"i]' ); - await this.page.click( 'role=menuitem[name=/Clear customizations/i]' ); + await this.page.click( + 'role=menuitem[name=/Delete custom template/i]' + ); await this.page.waitForSelector( 'role=button[name="Dismiss this notice"i] >> text="Template reverted."' ); From d5f7d1300747c70679a6e98416ac92e8670c9047 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Thu, 16 Jun 2022 17:42:19 +0300 Subject: [PATCH 2/3] change copy for template parts --- .../edit-site/src/components/template-details/template-areas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/template-details/template-areas.js b/packages/edit-site/src/components/template-details/template-areas.js index 1f9275f73e66f7..9edd7d2e067c2b 100644 --- a/packages/edit-site/src/components/template-details/template-areas.js +++ b/packages/edit-site/src/components/template-details/template-areas.js @@ -64,7 +64,7 @@ function TemplatePartItemMore( { ) } onClick={ clearCustomizations } > - { __( 'Clear customizations' ) } + { __( 'Delete custom template part' ) } ) } From 8d749045d52d922b88aea9390b9d417d83d9eaa7 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Mon, 8 Aug 2022 11:04:55 +0300 Subject: [PATCH 3/3] revert to `clear customizations` copy --- .../src/components/header/template-title/delete-template.js | 4 ++-- packages/edit-site/src/components/list/actions/index.js | 4 ++-- .../components/sidebar/template-card/template-actions.js | 4 ++-- packages/edit-site/src/components/template-details/index.js | 4 ++-- .../src/components/template-details/template-areas.js | 4 ++-- test/e2e/specs/site-editor/template-revert.spec.js | 6 ++---- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/packages/edit-post/src/components/header/template-title/delete-template.js b/packages/edit-post/src/components/header/template-title/delete-template.js index 84593feec9c4d3..9e0ac957b3dbd8 100644 --- a/packages/edit-post/src/components/header/template-title/delete-template.js +++ b/packages/edit-post/src/components/header/template-title/delete-template.js @@ -84,12 +84,12 @@ export default function DeleteTemplate() { } } info={ isRevertable - ? __( 'Use the template as supplied by the theme' ) + ? __( 'Use the template as supplied by the theme.' ) : undefined } > { isRevertable - ? __( 'Delete custom template' ) + ? __( 'Clear customizations' ) : __( 'Delete template' ) } { revertAndSaveTemplate(); onClose(); } } > - { __( 'Delete custom template' ) } + { __( 'Clear customizations' ) } ) } diff --git a/packages/edit-site/src/components/sidebar/template-card/template-actions.js b/packages/edit-site/src/components/sidebar/template-card/template-actions.js index d9461975667f69..b68cf1ff617579 100644 --- a/packages/edit-site/src/components/sidebar/template-card/template-actions.js +++ b/packages/edit-site/src/components/sidebar/template-card/template-actions.js @@ -29,14 +29,14 @@ export default function Actions( { template } ) { { revertTemplate( template ); onClose(); } } > - { __( 'Delete custom template' ) } + { __( 'Clear customizations' ) } ) } diff --git a/packages/edit-site/src/components/template-details/index.js b/packages/edit-site/src/components/template-details/index.js index e2561a0300bdce..7c7704a4580481 100644 --- a/packages/edit-site/src/components/template-details/index.js +++ b/packages/edit-site/src/components/template-details/index.js @@ -80,11 +80,11 @@ export default function TemplateDetails( { template, onClose } ) { - { __( 'Delete custom template' ) } + { __( 'Clear customizations' ) } ) } diff --git a/packages/edit-site/src/components/template-details/template-areas.js b/packages/edit-site/src/components/template-details/template-areas.js index 9edd7d2e067c2b..dfd8e33ad577d3 100644 --- a/packages/edit-site/src/components/template-details/template-areas.js +++ b/packages/edit-site/src/components/template-details/template-areas.js @@ -60,11 +60,11 @@ function TemplatePartItemMore( { - { __( 'Delete custom template part' ) } + { __( 'Clear customizations' ) } ) } diff --git a/test/e2e/specs/site-editor/template-revert.spec.js b/test/e2e/specs/site-editor/template-revert.spec.js index e141eec458536b..6a6ba6353a5e71 100644 --- a/test/e2e/specs/site-editor/template-revert.spec.js +++ b/test/e2e/specs/site-editor/template-revert.spec.js @@ -42,7 +42,7 @@ test.describe( 'Template Revert', () => { // The revert button isn't visible anymore. await expect( - page.locator( 'role=menuitem[name=/Delete custom template/i]' ) + page.locator( 'role=menuitem[name=/Clear customizations/i]' ) ).not.toBeVisible(); } ); @@ -279,9 +279,7 @@ class TemplateRevertUtils { async revertTemplate() { await this.page.click( 'role=button[name="Show template details"i]' ); - await this.page.click( - 'role=menuitem[name=/Delete custom template/i]' - ); + await this.page.click( 'role=menuitem[name=/Clear customizations/i]' ); await this.page.waitForSelector( 'role=button[name="Dismiss this notice"i] >> text="Template reverted."' );