Skip to content

Commit

Permalink
Add support for __experimentalCaptureToolbars (#1661)
Browse files Browse the repository at this point in the history
* Add support for __experimentalCaptureToolbars in Form block

* Accordion and Accordion Item blocks

* Author block

* Features

* Food & Drink

* Hero

* Services

* MediaCard

* Pricing Tables
  • Loading branch information
richtabor authored Sep 3, 2020
1 parent 22fe290 commit f4f1f45
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/blocks/accordion/accordion-item/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class AccordionItemEdit extends Component {
<InnerBlocks
template={ TEMPLATE }
templateInsertUpdatesSelection={ false }
__experimentalCaptureToolbars={ true }
/>
</div>
}
Expand Down
1 change: 1 addition & 0 deletions src/blocks/accordion/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class AccordionEdit extends Component {
<InnerBlocks
template={ getCount( count ) }
allowedBlocks={ ALLOWED_BLOCKS }
__experimentalCaptureToolbars={ true }
/>
{ isSelected && (
<div className="coblocks-block-appender">
Expand Down
1 change: 1 addition & 0 deletions src/blocks/author/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class AuthorEdit extends Component {
templateLock="all"
allowedBlocks={ [ 'core/button' ] }
templateInsertUpdatesSelection={ false }
__experimentalCaptureToolbars={ true }
/>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/features/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ class Edit extends Component {
allowedBlocks={ ALLOWED_BLOCKS }
templateLock="all"
templateInsertUpdatesSelection={ false }
renderAppender={ () => ( null ) } />
renderAppender={ () => ( null ) }
__experimentalCaptureToolbars={ true }
/>
</div>
</GutterWrapper>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/blocks/features/feature/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ class Edit extends Component {
templateLock={ false }
templateInsertUpdatesSelection={ false }
renderAppender={ () => ( null ) }
__experimentalCaptureToolbars={ true }
/>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/blocks/food-and-drinks/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ class FoodAndDrinksEdit extends Component {
allowedBlocks={ ALLOWED_BLOCKS }
template={ TEMPLATE }
templateInsertUpdatesSelection={ false }
__experimentalCaptureToolbars={ true }
/>
{ isSelected &&
<CustomAppender onClick={ this.insertNewItem } />
Expand Down
6 changes: 5 additions & 1 deletion src/blocks/form/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ class FormEdit extends Component {
blockVariationPicker() {
return (
<Fragment>
<InnerBlocks allowedBlocks={ ALLOWED_BLOCKS } />
<InnerBlocks
allowedBlocks={ ALLOWED_BLOCKS }
__experimentalCaptureToolbars={ true }
/>
</Fragment>
);
}
Expand All @@ -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 }
/>
</Fragment>
);
Expand Down
1 change: 1 addition & 0 deletions src/blocks/hero/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ export class Edit extends Component {
allowedBlocks={ ALLOWED_BLOCKS }
templateLock={ false }
templateInsertUpdatesSelection={ false }
__experimentalCaptureToolbars={ true }
/>
</ResizableBox>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/blocks/media-card/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ class Edit extends Component {
allowedBlocks={ ALLOWED_BLOCKS }
templateLock={ true }
templateInsertUpdatesSelection={ false }
__experimentalCaptureToolbars={ true }
/>
) }
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/blocks/pricing-table/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 } />
</div>
</GutterWrapper>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/blocks/services/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ class Edit extends Component {
allowedBlocks={ ALLOWED_BLOCKS }
template={ TEMPLATE }
templateInsertUpdatesSelection={ false }
__experimentalCaptureToolbars={ true }
/>
</div>
</GutterWrapper>
Expand Down

0 comments on commit f4f1f45

Please sign in to comment.