From f4f1f458d19bd4c7aef568bbe851bb2e3771e602 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Thu, 3 Sep 2020 15:45:15 -0400 Subject: [PATCH] Add support for __experimentalCaptureToolbars (#1661) * Add support for __experimentalCaptureToolbars in Form block * Accordion and Accordion Item blocks * Author block * Features * Food & Drink * Hero * Services * MediaCard * Pricing Tables --- src/blocks/accordion/accordion-item/edit.js | 1 + src/blocks/accordion/edit.js | 1 + src/blocks/author/edit.js | 1 + src/blocks/features/edit.js | 4 +++- src/blocks/features/feature/edit.js | 1 + src/blocks/food-and-drinks/edit.js | 1 + src/blocks/form/edit.js | 6 +++++- src/blocks/hero/edit.js | 1 + src/blocks/media-card/edit.js | 1 + src/blocks/pricing-table/edit.js | 3 ++- src/blocks/services/edit.js | 1 + 11 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/blocks/accordion/accordion-item/edit.js b/src/blocks/accordion/accordion-item/edit.js index 27ab25ddc35..9ab7ea8f046 100644 --- a/src/blocks/accordion/accordion-item/edit.js +++ b/src/blocks/accordion/accordion-item/edit.js @@ -96,6 +96,7 @@ class AccordionItemEdit extends Component { } diff --git a/src/blocks/accordion/edit.js b/src/blocks/accordion/edit.js index 55354d08ed7..f4f44baf157 100644 --- a/src/blocks/accordion/edit.js +++ b/src/blocks/accordion/edit.js @@ -105,6 +105,7 @@ class AccordionEdit extends Component { { isSelected && (
diff --git a/src/blocks/author/edit.js b/src/blocks/author/edit.js index 8a3f160fd6b..9a3f0d98a83 100644 --- a/src/blocks/author/edit.js +++ b/src/blocks/author/edit.js @@ -159,6 +159,7 @@ class AuthorEdit extends Component { templateLock="all" allowedBlocks={ [ 'core/button' ] } templateInsertUpdatesSelection={ false } + __experimentalCaptureToolbars={ true } />
diff --git a/src/blocks/features/edit.js b/src/blocks/features/edit.js index 7a3ee1d2981..74919d9cb6a 100644 --- a/src/blocks/features/edit.js +++ b/src/blocks/features/edit.js @@ -168,7 +168,9 @@ class Edit extends Component { allowedBlocks={ ALLOWED_BLOCKS } templateLock="all" templateInsertUpdatesSelection={ false } - renderAppender={ () => ( null ) } /> + renderAppender={ () => ( null ) } + __experimentalCaptureToolbars={ true } + /> diff --git a/src/blocks/features/feature/edit.js b/src/blocks/features/feature/edit.js index 2c98c867f6e..4d839de5735 100644 --- a/src/blocks/features/feature/edit.js +++ b/src/blocks/features/feature/edit.js @@ -167,6 +167,7 @@ class Edit extends Component { templateLock={ false } templateInsertUpdatesSelection={ false } renderAppender={ () => ( null ) } + __experimentalCaptureToolbars={ true } /> diff --git a/src/blocks/food-and-drinks/edit.js b/src/blocks/food-and-drinks/edit.js index 8a3952de4ee..0c6f5a01a7d 100644 --- a/src/blocks/food-and-drinks/edit.js +++ b/src/blocks/food-and-drinks/edit.js @@ -255,6 +255,7 @@ class FoodAndDrinksEdit extends Component { allowedBlocks={ ALLOWED_BLOCKS } template={ TEMPLATE } templateInsertUpdatesSelection={ false } + __experimentalCaptureToolbars={ true } /> { isSelected && diff --git a/src/blocks/form/edit.js b/src/blocks/form/edit.js index 800383e5d1a..70c8a215c7f 100644 --- a/src/blocks/form/edit.js +++ b/src/blocks/form/edit.js @@ -350,7 +350,10 @@ class FormEdit extends Component { blockVariationPicker() { return ( - + ); } @@ -371,6 +374,7 @@ class FormEdit extends Component { template={ this.supportsInnerBlocksPicker() ? this.state.template : TEMPLATE_OPTIONS[ 0 ].template } allowedBlocks={ ALLOWED_BLOCKS } templateInsertUpdatesSelection={ false } + __experimentalCaptureToolbars={ true } /> ); diff --git a/src/blocks/hero/edit.js b/src/blocks/hero/edit.js index 31237a1b82b..bef9607d2f9 100644 --- a/src/blocks/hero/edit.js +++ b/src/blocks/hero/edit.js @@ -305,6 +305,7 @@ export class Edit extends Component { allowedBlocks={ ALLOWED_BLOCKS } templateLock={ false } templateInsertUpdatesSelection={ false } + __experimentalCaptureToolbars={ true } /> diff --git a/src/blocks/media-card/edit.js b/src/blocks/media-card/edit.js index 0f034bb2649..3924d9f5968 100644 --- a/src/blocks/media-card/edit.js +++ b/src/blocks/media-card/edit.js @@ -275,6 +275,7 @@ class Edit extends Component { allowedBlocks={ ALLOWED_BLOCKS } templateLock={ true } templateInsertUpdatesSelection={ false } + __experimentalCaptureToolbars={ true } /> ) } diff --git a/src/blocks/pricing-table/edit.js b/src/blocks/pricing-table/edit.js index 3a3e1b3c334..1759f92eb26 100644 --- a/src/blocks/pricing-table/edit.js +++ b/src/blocks/pricing-table/edit.js @@ -97,7 +97,8 @@ class PricingTableEdit extends Component { template={ getCount( count ) } templateLock="insert" allowedBlocks={ ALLOWED_BLOCKS } - __experimentalMoverDirection={ count > 1 ? 'horizontal' : 'vertical' } /> + orientation={ count > 1 ? 'horizontal' : 'vertical' } + __experimentalCaptureToolbars={ true } /> diff --git a/src/blocks/services/edit.js b/src/blocks/services/edit.js index f35755fb8a3..bf90262927f 100644 --- a/src/blocks/services/edit.js +++ b/src/blocks/services/edit.js @@ -229,6 +229,7 @@ class Edit extends Component { allowedBlocks={ ALLOWED_BLOCKS } template={ TEMPLATE } templateInsertUpdatesSelection={ false } + __experimentalCaptureToolbars={ true } />