Add reusable BlockPopover and BlockPopoverInbetween components, remove default block appender button for empty paragraphs#40441
Merged
Conversation
|
Size Change: -161 B (0%) Total Size: 1.23 MB
ℹ️ View Unchanged
|
jorgefilipecosta
left a comment
Member
There was a problem hiding this comment.
We have some failing e2e tests, they are related to toolbar and inserter:
specs/editor/various/inserting-blocks.test.js
specs/editor/various/toolbar-roving-tabindex.test.js
So I think they are relevant and not something intermittent. Probably the tests just require some selector updates?
jorgefilipecosta
approved these changes
Apr 19, 2022
jorgefilipecosta
left a comment
Member
There was a problem hiding this comment.
Awesome PR, another great simplification of the logic we had around the codebase. Everything worked well on my tests.
Contributor
Author
|
Looks like something became more "async" with this PR as I'm seeing this failures that get solved in non headless mode or if I add "wait" calls. I'm not sure where though as I kept the logic the same 🤔 |
457e8ed to
7534904
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracted from #40376
What?
This is a refactor PR. It extracts two generic popover components that allows us to add UI to the block editor that is contextual to given blocks.
Why?
Right now these components are used to display the block toolbar and the in-between inserter. They'll be used for more in #40376
We can also potentially leverage them for more (thinking about the BoxVisualizer for instance here)
Notes
Testing Instructions
There should be no behavior/visual change aside the removal of the side inserter in paragraph blocks. So check block toolbars, block inserters, in between inserters.