Skip to content

Conversation

@donnapep
Copy link
Contributor

@donnapep donnapep commented May 11, 2021

Description

Fixes #31021.

Don't apply the has-parent CSS class to the toolbar if the __experimentalParentSelector flag is set. This class was applying the left margin to the toolbar when a block was selected in the widget area.

How has this been tested?

  1. In Appearance > Widgets, select a top level block in a widget area and ensure toolbar alignment is correct.
  2. Add the Navigation block to a page.
  3. Click Add all pages.
  4. Select the inner Page List block and ensure the block-editor-block-contextual-toolbar element has the has-parent class, and that the toolbar alignment is correct.

Screenshots

Screen Shot 2021-05-11 at 7 33 52 AM

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@donnapep donnapep requested a review from ellatrix as a code owner May 11, 2021 11:35
@talldan talldan added [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Bug An existing feature does not function as intended labels May 19, 2021
Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @donnapep, this is working well for me.

I've restarted the CI tests to see why they might be failing.

@talldan
Copy link
Contributor

talldan commented May 19, 2021

There are still some unusual failures in the CI tests.

@donnapep Would you be able to rebase the branch against the latest trunk and push to see if that resolves things?

kevin940726 and others added 25 commits May 19, 2021 08:02
* Use JSON serialization

* Move JSON to getAllBlocks

* Add comment
#29573)

* Block nodes: create useBlockRef for access to block node via ref

* Try layout effect

* Adjust useMergeRef to not depend on ref order

* wip

* Rewrite

* Fix multi select

* Revert useMergeRefs

* Fix roving toolbar reset

* Add inline docs
…#31209)

* components: Remove G2 portal

* components: Update popover to no longer use g2

* components: Update Card snapshots for popover
* Try: Toolbar gap.

* Retry toolbar gap

* Restore pointer-events with a more general selector

* Update packages/block-editor/src/components/block-list/style.scss

Co-authored-by: Mitchell Austin <[email protected]>
* Blocks: Introduce registerBlockTypeFromMetadata API

* Add i18n schema for block.json

* Docs: Update documentation for metadata and internationalization

* Test: Add test for registerBlockTypeFromMetadata

* Blocks: Translate metadata loaded from block.json

* Make fields translatable

* Docs: Add changelog entry

* Add i18n support for variations read from block metadata
* components: Remove wp-g2 from scrollable

* Update snapshot tests

* Update popover tests for scrollover dependency

* components: Update Card snapshots for scrollable
* In-between inserter: use usRefCallback, use showInsertionPoint

* Fix nested block issue

* Clean up

* Make __unstableOptions optional

* Make InsertionPoint a component again

* Clean up

* Rebase fixes
* components: Remove wp-g2 from form-group and control-label

* Update snapshots
* components: Remove wp-g2 imports from elevation

* components: Update elevation storybook to remove css prop

* Fix compilation errors and remove a usage of the `config` helper

* Update snapshot tests
* components: Remove wp-g2 from surface

* Update snapshots
#31243)

* components: Remove wp-g2 from flex, vstack, hstack, spinner and control-group

* Update snapshot tests

* Fix text highlighter test

* Update snapshots again
* Add color block support to table block
* Release script: Update react-native-editor version to 1.51.0

* Release script: Update with changes from 'npm run core preios'

* Release script: Update react-native-editor version to 1.51.1

* Release script: Update with changes from 'npm run core preios'

* Updates relative block-support asset path

* Update react-native-editor changelog

Includes 1.51.1 changes, as well as changes from 1.51.0 that were
overlooked and merged into `trunk` _after_ 1.51.0 had been tagged.

Co-authored-by: Antonis Lilis <[email protected]>
@donnapep
Copy link
Contributor Author

donnapep commented May 19, 2021

@talldan Borked this one. Will open a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Widgets editor: Toolbar is not left-aligned with the selected block