From 40d34af3deb80e656e63cff98a7b7b7d40f4be44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?So=CC=88ren=20Wrede?= Date: Thu, 13 Feb 2020 14:36:47 +0700 Subject: [PATCH] Make label `Open in new tab`consistent. --- .../block-editor/src/components/link-control/README.md | 2 +- .../src/components/link-control/settings-drawer.js | 2 +- .../link-control/test/__snapshots__/index.js.snap | 2 +- .../src/components/link-control/test/index.js | 4 ++-- .../block-editor/src/components/url-popover/README.md | 2 +- .../src/components/url-popover/image-url-input-ui.js | 2 +- packages/e2e-tests/specs/editor/various/links.test.js | 10 +++++----- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/block-editor/src/components/link-control/README.md b/packages/block-editor/src/components/link-control/README.md index ad82cae83d2b64..1f1ee55bdbfc21 100644 --- a/packages/block-editor/src/components/link-control/README.md +++ b/packages/block-editor/src/components/link-control/README.md @@ -30,7 +30,7 @@ Default properties include: [ { id: 'opensInNewTab', - title: 'Open in New Tab', + title: 'Open in new tab', }, ]; ``` diff --git a/packages/block-editor/src/components/link-control/settings-drawer.js b/packages/block-editor/src/components/link-control/settings-drawer.js index 5fc275ef07c660..34f230a1d14ca9 100644 --- a/packages/block-editor/src/components/link-control/settings-drawer.js +++ b/packages/block-editor/src/components/link-control/settings-drawer.js @@ -12,7 +12,7 @@ import { ToggleControl } from '@wordpress/components'; const defaultSettings = [ { id: 'opensInNewTab', - title: __( 'Open in New Tab' ), + title: __( 'Open in new tab' ), }, ]; diff --git a/packages/block-editor/src/components/link-control/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/link-control/test/__snapshots__/index.js.snap index db2b039353fb7d..faa5202cd23a8a 100644 --- a/packages/block-editor/src/components/link-control/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/link-control/test/__snapshots__/index.js.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Basic rendering should render 1`] = `""`; +exports[`Basic rendering should render 1`] = `""`; diff --git a/packages/block-editor/src/components/link-control/test/index.js b/packages/block-editor/src/components/link-control/test/index.js index 77f10013a6c857..e244cb495c4d7a 100644 --- a/packages/block-editor/src/components/link-control/test/index.js +++ b/packages/block-editor/src/components/link-control/test/index.js @@ -1381,7 +1381,7 @@ describe( 'Selecting links', () => { describe( 'Addition Settings UI', () => { it( 'should display "New Tab" setting (in "off" mode) by default when a link is selected', async () => { const selectedLink = first( fauxEntitySuggestions ); - const expectedSettingText = 'Open in New Tab'; + const expectedSettingText = 'Open in new tab'; const LinkControlConsumer = () => { const [ link ] = useState( selectedLink ); @@ -1418,7 +1418,7 @@ describe( 'Addition Settings UI', () => { const customSettings = [ { id: 'newTab', - title: 'Open in New Tab', + title: 'Open in new tab', }, { id: 'noFollow', diff --git a/packages/block-editor/src/components/url-popover/README.md b/packages/block-editor/src/components/url-popover/README.md index 13810e9e3cc8e9..1af8eeb670ad2f 100644 --- a/packages/block-editor/src/components/url-popover/README.md +++ b/packages/block-editor/src/components/url-popover/README.md @@ -64,7 +64,7 @@ class MyURLPopover extends Component { onClose={ this.closeURLPopover } renderSettings={ () => ( diff --git a/packages/block-editor/src/components/url-popover/image-url-input-ui.js b/packages/block-editor/src/components/url-popover/image-url-input-ui.js index b6b30af373868c..dfd45c71fc5b0e 100644 --- a/packages/block-editor/src/components/url-popover/image-url-input-ui.js +++ b/packages/block-editor/src/components/url-popover/image-url-input-ui.js @@ -228,7 +228,7 @@ const ImageURLInputUI = ( { const advancedOptions = ( <> diff --git a/packages/e2e-tests/specs/editor/various/links.test.js b/packages/e2e-tests/specs/editor/various/links.test.js index 797de506e7f5e7..8d6c27869cd72e 100644 --- a/packages/e2e-tests/specs/editor/various/links.test.js +++ b/packages/e2e-tests/specs/editor/various/links.test.js @@ -67,7 +67,7 @@ describe( 'Links', () => { // Type a URL await page.keyboard.type( 'https://wordpress.org/gutenberg' ); - // Navigate to and toggle the "Open in New Tab" checkbox. + // Navigate to and toggle the "Open in new tab" checkbox. await page.keyboard.press( 'Tab' ); await page.keyboard.press( 'Tab' ); await page.keyboard.press( 'Space' ); @@ -371,7 +371,7 @@ describe( 'Links', () => { ) ).not.toBeNull(); - // Tab to the "Open in New Tab" toggle. + // Tab to the "Open in new tab" toggle. await page.keyboard.press( 'Tab' ); await page.keyboard.press( 'Tab' ); @@ -467,7 +467,7 @@ describe( 'Links', () => { await pressKeyWithModifier( 'primary', 'k' ); await waitForAutoFocus(); - // Navigate to and toggle the "Open in New Tab" checkbox. + // Navigate to and toggle the "Open in new tab" checkbox. await page.keyboard.press( 'Tab' ); await page.keyboard.press( 'Tab' ); await page.keyboard.press( 'Space' ); @@ -476,7 +476,7 @@ describe( 'Links', () => { // a changing value of the setting. await page.waitForSelector( ':focus.components-form-toggle__input' ); - // Close dialog. Expect that "Open in New Tab" would have been applied + // Close dialog. Expect that "Open in new tab" would have been applied // immediately. await page.keyboard.press( 'Escape' ); @@ -505,7 +505,7 @@ describe( 'Links', () => { await pressKeyWithModifier( 'primary', 'k' ); await waitForAutoFocus(); - // Navigate to the "Open in New Tab" checkbox. + // Navigate to the "Open in new tab" checkbox. await page.keyboard.press( 'Tab' ); await page.keyboard.press( 'Tab' ); // Uncheck the checkbox.