-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sibling block inserter displaying at end of block list. #29920
Conversation
packages/block-editor/src/components/block-list/insertion-point.js
Outdated
Show resolved
Hide resolved
Size Change: +10 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
2ee5abd
to
da8b765
Compare
da8b765
to
1955412
Compare
I'm not completely sure why this suddenly caused a consistent test failure, but the test was selecting a template part by clicking, and was failing because it clicked the inserter between two columns in the template part. Testing manually, the same thing happens in It's actually pretty difficult to select the template part by clicking the block itself, so I've updated the test to use List View to select the block. Edit: same issue with the document settings test as well. |
@@ -200,6 +200,18 @@ function InsertionPointPopover( { | |||
} | |||
} | |||
|
|||
// Only show the inserter when there's a `nextElement` (a block after the | |||
// insertion point). At the end of the block list the trailing appender | |||
// should serve the purpose of inserting blocks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there's no appender available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's an issue, from what I understand this inserter was never intended to show at the end of a block list. Its appearance there is a bug from #28418.
Thanks for reviewing @ellatrix. |
Thanks for fixing this :) I appreciate it. |
* Only show inserter version of insertion point if there is a next block * Clarify comment * Improve boolean logic * Update e2e test * Update tests
* Only show inserter version of insertion point if there is a next block * Clarify comment * Improve boolean logic * Update e2e test * Update tests
Description
Fixes #28907
How has this been tested?
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: