From 8ff2e607b0f69f2e150ee83da6f3ef24ba3ebad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?So=CC=88ren=20Wrede?= Date: Tue, 18 Feb 2020 02:04:05 +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 4b590885ae8be..c55f2a37df001 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 5fc275ef07c66..34f230a1d14ca 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 4df2e11b4197f..c295891621df4 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 6e003a77e6dc4..d783a07c2f98d 100644 --- a/packages/block-editor/src/components/link-control/test/index.js +++ b/packages/block-editor/src/components/link-control/test/index.js @@ -836,7 +836,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 ); @@ -873,7 +873,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 13810e9e3cc8e..1af8eeb670ad2 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 b6b30af373868..dfd45c71fc5b0 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 797de506e7f5e..8d6c27869cd72 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.