From 3fcdf2d77ab8dd13b744a4c8796dbf9f68c91740 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 21 May 2020 10:39:41 +0200 Subject: [PATCH 1/4] Fix matrix popover style. --- .../src/components/block-alignment-matrix-toolbar/index.js | 3 ++- packages/components/src/dropdown/index.js | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/block-alignment-matrix-toolbar/index.js b/packages/block-editor/src/components/block-alignment-matrix-toolbar/index.js index fae00840d121b..b9ea81e939e86 100644 --- a/packages/block-editor/src/components/block-alignment-matrix-toolbar/index.js +++ b/packages/block-editor/src/components/block-alignment-matrix-toolbar/index.js @@ -24,12 +24,13 @@ export function BlockAlignmentMatrixToolbar( props ) { const icon = ; const className = 'block-editor-block-alignment-matrix-toolbar'; const popoverClassName = `${ className }__popover`; + const isAlternate = true; return ( { const openOnArrowDown = ( event ) => { if ( ! isOpen && event.keyCode === DOWN ) { diff --git a/packages/components/src/dropdown/index.js b/packages/components/src/dropdown/index.js index 1c42dcaa4ccef..dbf8380b1ffa4 100644 --- a/packages/components/src/dropdown/index.js +++ b/packages/components/src/dropdown/index.js @@ -103,7 +103,6 @@ class Dropdown extends Component { expandOnMobile={ expandOnMobile } headerTitle={ headerTitle } focusOnMount={ focusOnMount } - isAlternate { ...popoverProps } className={ classnames( 'components-dropdown__content', From 8488f8eb177c13c8c3856cbfd4424bb1db6f06c5 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 21 May 2020 10:43:52 +0200 Subject: [PATCH 2/4] Fix for replace flow. --- .../block-editor/src/components/media-replace-flow/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-editor/src/components/media-replace-flow/index.js b/packages/block-editor/src/components/media-replace-flow/index.js index e7e5b261a14db..ccfd9d885f9cc 100644 --- a/packages/block-editor/src/components/media-replace-flow/index.js +++ b/packages/block-editor/src/components/media-replace-flow/index.js @@ -105,8 +105,13 @@ const MediaReplaceFlow = ( { } }; + const POPOVER_PROPS = { + isAlternate: true, + }; + return ( ( From 5b1668c503b42f899aa92f3fafa1376186154c35 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 21 May 2020 11:05:18 +0200 Subject: [PATCH 3/4] Fix alignment toolbars. --- .../src/components/block-alignment-toolbar/index.js | 5 +++++ .../src/components/block-vertical-alignment-toolbar/index.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/packages/block-editor/src/components/block-alignment-toolbar/index.js b/packages/block-editor/src/components/block-alignment-toolbar/index.js index ed7fd8754fab0..72779e34c2c1c 100644 --- a/packages/block-editor/src/components/block-alignment-toolbar/index.js +++ b/packages/block-editor/src/components/block-alignment-toolbar/index.js @@ -45,6 +45,10 @@ const DEFAULT_CONTROLS = [ 'left', 'center', 'right', 'wide', 'full' ]; const DEFAULT_CONTROL = 'center'; const WIDE_CONTROLS = [ 'wide', 'full' ]; +const POPOVER_PROPS = { + isAlternate: true, +}; + export function BlockAlignmentToolbar( { value, onChange, @@ -68,6 +72,7 @@ export function BlockAlignmentToolbar( { return ( Date: Mon, 25 May 2020 08:35:44 +0200 Subject: [PATCH 4/4] Update snapshots. --- .../block-alignment-toolbar/test/__snapshots__/index.js.snap | 5 +++++ .../test/__snapshots__/index.js.snap | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap index 48c90acf60691..564a49e4dd238 100644 --- a/packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap @@ -60,5 +60,10 @@ exports[`BlockAlignmentToolbar should match snapshot 1`] = ` } isCollapsed={true} label="Change alignment" + popoverProps={ + Object { + "isAlternate": true, + } + } /> `; diff --git a/packages/block-editor/src/components/block-vertical-alignment-toolbar/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-vertical-alignment-toolbar/test/__snapshots__/index.js.snap index 1a01cf290f1c8..c476fe14bed75 100644 --- a/packages/block-editor/src/components/block-vertical-alignment-toolbar/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/block-vertical-alignment-toolbar/test/__snapshots__/index.js.snap @@ -60,5 +60,10 @@ exports[`BlockVerticalAlignmentToolbar should match snapshot 1`] = ` } isCollapsed={true} label="Change vertical alignment" + popoverProps={ + Object { + "isAlternate": true, + } + } /> `;