From df60f4abd2567135c9f57193bf2c1670af68c70e Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Tue, 10 Dec 2019 12:52:36 -0500 Subject: [PATCH 1/3] Block Editor: Remove legacy "editor-" class name compatibility --- packages/base-styles/_z-index.scss | 1 - .../components/block-compare/block-view.js | 10 +++++----- .../src/components/block-compare/index.js | 10 +++++----- .../test/__snapshots__/block-view.js.snap | 10 +++++----- .../src/components/block-drop-zone/index.js | 2 +- .../src/components/block-icon/index.js | 2 +- .../src/components/block-inspector/index.js | 4 ++-- .../block-list/block-contextual-toolbar.js | 2 +- .../src/components/block-list/block-html.js | 2 +- .../block-list/block-invalid-warning.js | 2 +- .../src/components/block-list/block.js | 8 ++++---- .../src/components/block-list/breadcrumb.js | 2 +- .../src/components/block-list/index.js | 2 +- .../components/block-list/insertion-point.js | 6 +++--- .../src/components/block-mover/index.js | 12 +++++------ .../src/components/block-mover/style.scss | 2 +- .../src/components/block-mover/test/index.js | 4 ++-- .../components/block-navigation/dropdown.js | 4 ++-- .../src/components/block-navigation/index.js | 4 ++-- .../src/components/block-navigation/list.js | 8 ++++---- .../src/components/block-preview/style.scss | 2 +- .../block-convert-button.js | 2 +- .../block-settings-menu/block-mode-toggle.js | 2 +- .../components/block-settings-menu/index.js | 10 +++++----- .../src/components/block-styles/index.js | 8 ++++---- .../src/components/block-switcher/index.js | 10 +++++----- .../test/__snapshots__/index.js.snap | 10 +++++----- .../src/components/block-toolbar/index.js | 4 ++-- .../src/components/block-types-list/index.js | 2 +- .../src/components/color-palette/control.js | 4 ++-- .../test/__snapshots__/control.js.snap | 4 ++-- .../src/components/contrast-checker/index.js | 2 +- .../test/__snapshots__/index.js.snap | 12 +++++------ .../default-block-appender/index.js | 4 ++-- .../test/__snapshots__/index.js.snap | 12 +++++------ .../src/components/inner-blocks/index.js | 2 +- .../src/components/inner-blocks/style.scss | 2 +- .../components/inserter-list-item/index.js | 8 ++++---- .../inserter-with-shortcuts/index.js | 4 ++-- .../src/components/inserter/child-blocks.js | 4 ++-- .../src/components/inserter/index.js | 6 +++--- .../src/components/inserter/menu.js | 12 +++++------ .../test/__snapshots__/index.js.snap | 2 +- .../src/components/media-placeholder/index.js | 17 +++++----------- .../components/media-replace-flow/index.js | 2 +- .../multi-selection-inspector/index.js | 8 ++++---- .../components/panel-color-settings/index.js | 4 ++-- .../test/__snapshots__/index.js.snap | 12 +++++------ .../src/components/plain-text/index.js | 2 +- .../rich-text/format-toolbar/index.js | 2 +- .../src/components/rich-text/index.js | 4 ++-- .../skip-to-selected-block/index.js | 2 +- .../src/components/url-input/button.js | 8 ++++---- .../src/components/url-input/index.js | 5 ++--- .../src/components/url-popover/index.js | 8 ++++---- .../test/__snapshots__/index.js.snap | 18 ++++++++--------- .../src/components/warning/index.js | 12 +++++------ .../warning/test/__snapshots__/index.js.snap | 6 +++--- .../src/components/writing-flow/index.js | 4 ++-- packages/block-editor/src/utils/test/dom.js | 12 +++++------ .../src/block/edit-panel/editor.scss | 2 +- .../block-library/src/classic/editor.scss | 2 +- .../block-library/src/columns/editor.scss | 20 +++++++++---------- .../embed/test/__snapshots__/index.js.snap | 2 +- packages/block-library/src/group/editor.scss | 18 ++++++++--------- .../block-library/src/media-text/editor.scss | 2 +- .../src/social-links/editor.scss | 4 ++-- .../specs/editor/blocks/group.test.js | 6 +++--- .../__snapshots__/plugins-api.test.js.snap | 4 ++-- .../specs/editor/plugins/cpt-locking.test.js | 10 +++++----- .../plugin-block-settings-menu-group.js | 2 +- .../visual-editor/block-inspector-button.js | 2 +- 72 files changed, 208 insertions(+), 217 deletions(-) diff --git a/packages/base-styles/_z-index.scss b/packages/base-styles/_z-index.scss index 9bdedb9fe09d17..0841cb4128915a 100644 --- a/packages/base-styles/_z-index.scss +++ b/packages/base-styles/_z-index.scss @@ -58,7 +58,6 @@ $z-layers: ( // The toolbar, when contextual, should be above any adjacent nested block click overlays. ".block-editor-block-list__layout .reusable-block-edit-panel": 61, ".block-editor-block-contextual-toolbar": 61, - ".editor-inner-blocks .block-editor-block-list__breadcrumb": 62, // The block mover, particularly in nested contexts, // should overlap most block content. diff --git a/packages/block-editor/src/components/block-compare/block-view.js b/packages/block-editor/src/components/block-compare/block-view.js index 274c2896d98a9e..ffe120658c412c 100644 --- a/packages/block-editor/src/components/block-compare/block-view.js +++ b/packages/block-editor/src/components/block-compare/block-view.js @@ -6,19 +6,19 @@ import { Button } from '@wordpress/components'; const BlockView = ( { title, rawContent, renderedContent, action, actionText, className } ) => { return (
-
-

{ title }

+
+

{ title }

-
+
{ rawContent }
-
+
{ renderedContent }
-
+
diff --git a/packages/block-editor/src/components/block-compare/index.js b/packages/block-editor/src/components/block-compare/index.js index 1b294649e9c627..18638255508ecf 100644 --- a/packages/block-editor/src/components/block-compare/index.js +++ b/packages/block-editor/src/components/block-compare/index.js @@ -23,8 +23,8 @@ class BlockCompare extends Component { return difference.map( ( item, pos ) => { const classes = classnames( { - 'editor-block-compare__added block-editor-block-compare__added': item.added, - 'editor-block-compare__removed block-editor-block-compare__removed': item.removed, + 'block-editor-block-compare__added': item.added, + 'block-editor-block-compare__removed': item.removed, } ); return { item.value }; @@ -59,10 +59,10 @@ class BlockCompare extends Component { const difference = this.getDifference( original.rawContent, converted.rawContent ); return ( -
+

title

raw
render
+ { __( 'No block selected.' ) } ); @@ -70,7 +70,7 @@ const BlockInspector = ( { { ( { hasFills } ) => hasFills( InspectorAdvancedControls.slotName ) && ( diff --git a/packages/block-editor/src/components/block-list/block-contextual-toolbar.js b/packages/block-editor/src/components/block-list/block-contextual-toolbar.js index 36575d90f9ab59..ce9a1c8578084c 100644 --- a/packages/block-editor/src/components/block-list/block-contextual-toolbar.js +++ b/packages/block-editor/src/components/block-list/block-contextual-toolbar.js @@ -13,7 +13,7 @@ function BlockContextualToolbar( { focusOnMount } ) { return ( diff --git a/packages/block-editor/src/components/block-list/block-html.js b/packages/block-editor/src/components/block-list/block-html.js index a3b4dc21742341..f9a83feaafb3ca 100644 --- a/packages/block-editor/src/components/block-list/block-html.js +++ b/packages/block-editor/src/components/block-list/block-html.js @@ -39,7 +39,7 @@ function BlockHTML( { clientId } ) { return ( setHtml( event.target.value ) } diff --git a/packages/block-editor/src/components/block-list/block-invalid-warning.js b/packages/block-editor/src/components/block-list/block-invalid-warning.js index f28c4224058356..0b1d45c1084863 100644 --- a/packages/block-editor/src/components/block-list/block-invalid-warning.js +++ b/packages/block-editor/src/components/block-list/block-invalid-warning.js @@ -71,7 +71,7 @@ export class BlockInvalidWarning extends Component { __( 'Resolve Block' ) } onRequestClose={ this.onCompareClose } - className="editor-block-compare block-editor-block-compare" + className="block-editor-block-compare" > }
@@ -613,7 +613,7 @@ function BlockListBlock( {
{ showInserterShortcuts && ( -
+
) } { showEmptyBlockSideInserter && ( -
+
{ const { setNavigationMode } = useDispatch( 'core/block-editor' ); return ( -
+
diff --git a/packages/block-editor/src/components/inserter-with-shortcuts/index.js b/packages/block-editor/src/components/inserter-with-shortcuts/index.js index 71adf33922bff5..2a0b8155551aef 100644 --- a/packages/block-editor/src/components/inserter-with-shortcuts/index.js +++ b/packages/block-editor/src/components/inserter-with-shortcuts/index.js @@ -30,11 +30,11 @@ function InserterWithShortcuts( { items, isLocked, onInsert } ) { } ).slice( 0, 3 ); return ( -
+
{ itemsWithoutDefaultBlock.map( ( item ) => ( onInsert( item ) } // translators: %s: block title/name to be added label={ sprintf( __( 'Add %s' ), item.title ) } diff --git a/packages/block-editor/src/components/inserter/child-blocks.js b/packages/block-editor/src/components/inserter/child-blocks.js index 53590af3a1ee72..94764a94b4fe7d 100644 --- a/packages/block-editor/src/components/inserter/child-blocks.js +++ b/packages/block-editor/src/components/inserter/child-blocks.js @@ -12,9 +12,9 @@ import BlockIcon from '../block-icon'; function ChildBlocks( { rootBlockIcon, rootBlockTitle, items, ...props } ) { return ( -
+
{ ( rootBlockIcon || rootBlockTitle ) && ( -
+
{ rootBlockTitle &&

{ rootBlockTitle }

}
diff --git a/packages/block-editor/src/components/inserter/index.js b/packages/block-editor/src/components/inserter/index.js index fc153b21ea303b..2db998bb768e17 100644 --- a/packages/block-editor/src/components/inserter/index.js +++ b/packages/block-editor/src/components/inserter/index.js @@ -38,7 +38,7 @@ const defaultRenderToggle = ( { onToggle, disabled, isOpen, blockTitle, hasSingl event.currentTarget.focus(); } } onClick={ onToggle } - className="editor-inserter__toggle block-editor-inserter__toggle" + className="block-editor-inserter__toggle" aria-haspopup={ ! hasSingleBlockType ? 'true' : false } aria-expanded={ ! hasSingleBlockType ? isOpen : false } disabled={ disabled } @@ -124,8 +124,8 @@ class Inserter extends Component { return (
{ __( 'Manage All Reusable Blocks' ) } @@ -382,7 +382,7 @@ export class InserterMenu extends Component { } if ( ! hasItems ) { return ( -

{ __( 'No blocks found.' ) }

+

{ __( 'No blocks found.' ) }

); } return null; 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 e1dba581caf897..feac082de26346 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 display with required props 1`] = `"
"`; +exports[`Basic rendering should display with required props 1`] = `"
"`; diff --git a/packages/block-editor/src/components/media-placeholder/index.js b/packages/block-editor/src/components/media-placeholder/index.js index cb5fc3806f0301..d7d72d4a39ddf1 100644 --- a/packages/block-editor/src/components/media-placeholder/index.js +++ b/packages/block-editor/src/components/media-placeholder/index.js @@ -37,11 +37,11 @@ import URLPopover from '../url-popover'; const InsertFromURLPopover = ( { src, onChange, onSubmit, onClose } ) => (
( value={ src } /> +
); diff --git a/packages/block-editor/src/components/url-input/button.js b/packages/block-editor/src/components/url-input/button.js index a1b57e5d3d6548..1eb4912d029d46 100644 --- a/packages/block-editor/src/components/url-input/button.js +++ b/packages/block-editor/src/components/url-input/button.js @@ -35,7 +35,7 @@ class URLInputButton extends Component { const buttonLabel = url ? __( 'Edit link' ) : __( 'Insert link' ); return ( -
+
{ expanded && -
+
this.handleOnClick( suggestion ) } diff --git a/packages/block-editor/src/components/url-popover/index.js b/packages/block-editor/src/components/url-popover/index.js index e39e4cc478e3e2..776597470f93d7 100644 --- a/packages/block-editor/src/components/url-popover/index.js +++ b/packages/block-editor/src/components/url-popover/index.js @@ -49,17 +49,17 @@ class URLPopover extends Component { return (
-
+
{ children } { !! renderSettings && ( { showSettings && ( -
+
{ renderSettings() }
) } diff --git a/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap index c6d7ebe5091efb..f93e04fed4cf46 100644 --- a/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap @@ -2,7 +2,7 @@ exports[`URLPopover matches the snapshot in its default state 1`] = ` @@ -10,14 +10,14 @@ exports[`URLPopover matches the snapshot in its default state 1`] = ` className="block-editor-url-popover__input-container" >
Editor
@@ -37,21 +37,21 @@ exports[`URLPopover matches the snapshot when the settings are toggled open 1`] className="block-editor-url-popover__input-container" >
Editor
Settings @@ -63,7 +63,7 @@ exports[`URLPopover matches the snapshot when the settings are toggled open 1`] exports[`URLPopover matches the snapshot when there are no settings 1`] = ` @@ -71,7 +71,7 @@ exports[`URLPopover matches the snapshot when there are no settings 1`] = ` className="block-editor-url-popover__input-container" >
Editor diff --git a/packages/block-editor/src/components/warning/index.js b/packages/block-editor/src/components/warning/index.js index 38e7dc18a64508..d97f7363e8b21e 100644 --- a/packages/block-editor/src/components/warning/index.js +++ b/packages/block-editor/src/components/warning/index.js @@ -12,14 +12,14 @@ import { __ } from '@wordpress/i18n'; function Warning( { className, actions, children, secondaryActions } ) { return ( -
-
-

{ children }

+
+
+

{ children }

{ Children.count( actions ) > 0 && ( -
+
{ Children.map( actions, ( action, i ) => ( - + { action } ) ) } @@ -29,7 +29,7 @@ function Warning( { className, actions, children, secondaryActions } ) { { secondaryActions && ( (

error

diff --git a/packages/block-editor/src/components/writing-flow/index.js b/packages/block-editor/src/components/writing-flow/index.js index cd9355bcf2a36e..5606559f7ad583 100644 --- a/packages/block-editor/src/components/writing-flow/index.js +++ b/packages/block-editor/src/components/writing-flow/index.js @@ -384,7 +384,7 @@ class WritingFlow extends Component { // bubbling events from children to determine focus transition intents. /* eslint-disable jsx-a11y/no-static-element-interactions */ return ( -
+
); diff --git a/packages/block-editor/src/utils/test/dom.js b/packages/block-editor/src/utils/test/dom.js index 45533fa436a199..69e740f629f48d 100644 --- a/packages/block-editor/src/utils/test/dom.js +++ b/packages/block-editor/src/utils/test/dom.js @@ -7,8 +7,8 @@ describe( 'hasInnerBlocksContext()', () => { it( 'should return false for a block node which has no inner blocks', () => { const wrapper = document.createElement( 'div' ); wrapper.innerHTML = ( - '
' + - '
' + + '
' + + '
' + '

This is a test.

' + '
' + '
' @@ -21,11 +21,11 @@ describe( 'hasInnerBlocksContext()', () => { it( 'should return true for a block node which contains inner blocks', () => { const wrapper = document.createElement( 'div' ); wrapper.innerHTML = ( - '
' + - '
' + + '
' + + '
' + '
' + - '
' + - '
' + + '
' + + '
' + '
' + '
' + '
' diff --git a/packages/block-library/src/block/edit-panel/editor.scss b/packages/block-library/src/block/edit-panel/editor.scss index 6c86bb9221af0b..12c2bcfc1ef8fa 100644 --- a/packages/block-library/src/block/edit-panel/editor.scss +++ b/packages/block-library/src/block/edit-panel/editor.scss @@ -65,7 +65,7 @@ } } -.editor-block-list__layout .is-selected .reusable-block-edit-panel { +.block-editor-block-list__layout .is-selected .reusable-block-edit-panel { border-color: $dark-opacity-light-800; border-left-color: transparent; diff --git a/packages/block-library/src/classic/editor.scss b/packages/block-library/src/classic/editor.scss index c36f1b96b055a3..4c630758b7adaf 100644 --- a/packages/block-library/src/classic/editor.scss +++ b/packages/block-library/src/classic/editor.scss @@ -254,7 +254,7 @@ div[data-type="core/freeform"] { border-left-color: transparent; } - .editor-block-contextual-toolbar + div { + .block-editor-block-contextual-toolbar + div { margin-top: 0; padding-top: 0; } diff --git a/packages/block-library/src/columns/editor.scss b/packages/block-library/src/columns/editor.scss index 17d9a5a7b12afe..7c4be56fe335ff 100644 --- a/packages/block-library/src/columns/editor.scss +++ b/packages/block-library/src/columns/editor.scss @@ -2,9 +2,9 @@ // This is sort of an experiment at making sure the editor looks as much like the end result as possible // Potentially the rules here can apply to all nested blocks and enable stacking, in which case it should be moved elsewhere // When using CSS grid, margins do not collapse on the container. -.wp-block-columns .editor-block-list__layout { +.wp-block-columns .block-editor-block-list__layout { // This max-width is used to constrain the main editor column, it should not cascade into columns - .editor-block-list__block { + .block-editor-block-list__block { max-width: none; } } @@ -12,7 +12,7 @@ .wp-block-columns { display: block; - > .editor-inner-blocks > .editor-block-list__layout { + > .block-editor-inner-blocks > .block-editor-block-list__layout { display: flex; // Responsiveness: Allow wrapping on mobile. @@ -23,9 +23,9 @@ } // Set full heights on Columns to enable vertical alignment preview > [data-type="core/column"], - > [data-type="core/column"] > .editor-block-list__block-edit, - > [data-type="core/column"] > .editor-block-list__block-edit > div[data-block], - > [data-type="core/column"] > .editor-block-list__block-edit .block-core-columns { + > [data-type="core/column"] > .block-editor-block-list__block-edit, + > [data-type="core/column"] > .block-editor-block-list__block-edit > div[data-block], + > [data-type="core/column"] > .block-editor-block-list__block-edit .block-core-columns { display: flex; flex-direction: column; @@ -81,7 +81,7 @@ } } - > .editor-block-list__block-edit { + > .block-editor-block-list__block-edit { margin-top: 0; margin-bottom: 0; @@ -91,7 +91,7 @@ right: 0; } - > .editor-block-contextual-toolbar { + > .block-editor-block-contextual-toolbar { margin-left: -$border-width; } @@ -104,7 +104,7 @@ // The Columns block is a flex-container, therefore it nullifies margin collapsing. // Therefore, blocks inside this will appear to create a double margin. // We compensate for this using negative margins. - > div > .block-core-columns > .editor-inner-blocks { + > div > .block-core-columns > .block-editor-inner-blocks { margin-top: -$default-block-margin; margin-bottom: -$default-block-margin; } @@ -152,7 +152,7 @@ div.block-core-columns.is-vertically-aligned-bottom { /** * Fixes single Column breadcrumb position. */ -[data-type="core/column"] > .editor-block-list__block-edit > .editor-block-list__breadcrumb { +[data-type="core/column"] > .block-editor-block-list__block-edit > .editor-block-list__breadcrumb { left: -$block-left-border-width; } diff --git a/packages/block-library/src/embed/test/__snapshots__/index.js.snap b/packages/block-library/src/embed/test/__snapshots__/index.js.snap index 2023cab5e5b65f..75222a004b93fe 100644 --- a/packages/block-library/src/embed/test/__snapshots__/index.js.snap +++ b/packages/block-library/src/embed/test/__snapshots__/index.js.snap @@ -8,7 +8,7 @@ exports[`core/embed block edit matches snapshot 1`] = ` class="components-placeholder__label" >
Sidebar title plugin
"`; +exports[`Using Plugins API Sidebar Medium screen Should open plugins sidebar using More Menu item and render content 1`] = `"
Sidebar title plugin
"`; -exports[`Using Plugins API Sidebar Should open plugins sidebar using More Menu item and render content 1`] = `"
Sidebar title plugin
"`; +exports[`Using Plugins API Sidebar Should open plugins sidebar using More Menu item and render content 1`] = `"
Sidebar title plugin
"`; diff --git a/packages/e2e-tests/specs/editor/plugins/cpt-locking.test.js b/packages/e2e-tests/specs/editor/plugins/cpt-locking.test.js index 74f8f81bf67e3f..92689539fb5e84 100644 --- a/packages/e2e-tests/specs/editor/plugins/cpt-locking.test.js +++ b/packages/e2e-tests/specs/editor/plugins/cpt-locking.test.js @@ -28,7 +28,7 @@ describe( 'cpt locking', () => { }; const shouldNotAllowBlocksToBeRemoved = async () => { - await page.type( '.editor-rich-text__editable.wp-block-paragraph', 'p1' ); + await page.type( '.block-editor-rich-text__editable.wp-block-paragraph', 'p1' ); await clickBlockToolbarButton( 'More options' ); expect( await page.$x( '//button[contains(text(), "Remove Block")]' ) @@ -36,12 +36,12 @@ describe( 'cpt locking', () => { }; const shouldAllowBlocksToBeMoved = async () => { - await page.click( '.editor-rich-text__editable.wp-block-paragraph' ); + await page.click( '.block-editor-rich-text__editable.wp-block-paragraph' ); expect( await page.$( 'button[aria-label="Move up"]' ) ).not.toBeNull(); await page.click( 'button[aria-label="Move up"]' ); - await page.type( '.editor-rich-text__editable.wp-block-paragraph', 'p1' ); + await page.type( '.block-editor-rich-text__editable.wp-block-paragraph', 'p1' ); expect( await getEditedPostContent() ).toMatchSnapshot(); }; @@ -55,7 +55,7 @@ describe( 'cpt locking', () => { it( 'should not allow blocks to be removed', shouldNotAllowBlocksToBeRemoved ); it( 'should not allow blocks to be moved', async () => { - await page.click( '.editor-rich-text__editable.wp-block-paragraph' ); + await page.click( '.block-editor-rich-text__editable.wp-block-paragraph' ); expect( await page.$( 'button[aria-label="Move up"]' ) ).toBeNull(); @@ -111,7 +111,7 @@ describe( 'cpt locking', () => { } ); it( 'should allow blocks to be removed', async () => { - await page.type( '.editor-rich-text__editable.wp-block-paragraph', 'p1' ); + await page.type( '.block-editor-rich-text__editable.wp-block-paragraph', 'p1' ); await clickBlockToolbarButton( 'More options' ); const [ removeBlock ] = await page.$x( '//button[contains(text(), "Remove Block")]' ); await removeBlock.click(); diff --git a/packages/edit-post/src/components/block-settings-menu/plugin-block-settings-menu-group.js b/packages/edit-post/src/components/block-settings-menu/plugin-block-settings-menu-group.js index a762c52a9f2a3a..435f912ce03a88 100644 --- a/packages/edit-post/src/components/block-settings-menu/plugin-block-settings-menu-group.js +++ b/packages/edit-post/src/components/block-settings-menu/plugin-block-settings-menu-group.js @@ -17,7 +17,7 @@ const PluginBlockSettingsMenuGroupSlot = ( { fillProps, selectedBlocks } ) => { { ( fills ) => ! isEmpty( fills ) && ( <> -
+
{ fills } ) } diff --git a/packages/edit-post/src/components/visual-editor/block-inspector-button.js b/packages/edit-post/src/components/visual-editor/block-inspector-button.js index cf73fe27de92f7..bc2f4d000cb16b 100644 --- a/packages/edit-post/src/components/visual-editor/block-inspector-button.js +++ b/packages/edit-post/src/components/visual-editor/block-inspector-button.js @@ -36,7 +36,7 @@ export function BlockInspectorButton( { return ( Date: Tue, 10 Dec 2019 13:11:49 -0500 Subject: [PATCH 2/3] Block Editor: Update lingering references to legacy block icon class --- .../edit-post/src/components/manage-blocks-modal/style.scss | 2 +- packages/editor/src/components/autocompleters/style.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/edit-post/src/components/manage-blocks-modal/style.scss b/packages/edit-post/src/components/manage-blocks-modal/style.scss index a763b04483bb11..0c61db4e232b1f 100644 --- a/packages/edit-post/src/components/manage-blocks-modal/style.scss +++ b/packages/edit-post/src/components/manage-blocks-modal/style.scss @@ -112,7 +112,7 @@ padding: 0.6rem 0 0.6rem 10px; } - .editor-block-icon { + .block-editor-block-icon { margin-right: 10px; fill: $dark-gray-500; } diff --git a/packages/editor/src/components/autocompleters/style.scss b/packages/editor/src/components/autocompleters/style.scss index d41748a13d27ed..48a6e1fb299ec7 100644 --- a/packages/editor/src/components/autocompleters/style.scss +++ b/packages/editor/src/components/autocompleters/style.scss @@ -1,5 +1,5 @@ .editor-autocompleters__block { - .editor-block-icon { + .block-editor-block-icon { margin-right: 8px; } } From 81761ee0e49a431b061aa97fe6ae3d54aae48731 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Tue, 10 Dec 2019 16:08:58 -0500 Subject: [PATCH 3/3] E2E Tests: Restore expected block menu class name for group block See: https://github.com/WordPress/gutenberg/blob/e6f9765/packages/blocks/src/api/serializer.js#L45-L58 --- packages/e2e-tests/specs/editor/blocks/group.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/e2e-tests/specs/editor/blocks/group.test.js b/packages/e2e-tests/specs/editor/blocks/group.test.js index 309a6e872bb1fa..7ce9021d26bd4b 100644 --- a/packages/e2e-tests/specs/editor/blocks/group.test.js +++ b/packages/e2e-tests/specs/editor/blocks/group.test.js @@ -15,7 +15,7 @@ describe( 'Group', () => { it( 'can be created using the block inserter', async () => { await searchForBlock( 'Group' ); - await page.click( '.block-editor-block-list-item-group' ); + await page.click( '.editor-block-list-item-group' ); expect( await getEditedPostContent() ).toMatchSnapshot(); } ); @@ -30,9 +30,9 @@ describe( 'Group', () => { it( 'can have other blocks appended to it using the button appender', async () => { await searchForBlock( 'Group' ); - await page.click( '.block-editor-block-list-item-group' ); + await page.click( '.editor-block-list-item-group' ); await page.click( '.block-editor-button-block-appender' ); - await page.click( '.block-editor-block-list-item-paragraph' ); + await page.click( '.editor-block-list-item-paragraph' ); await page.keyboard.type( 'Group Block with a Paragraph' ); expect( await getEditedPostContent() ).toMatchSnapshot();