-
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
Block Insertion: Clear the insertion point when selecting a different block or clearing block selection #64048
Conversation
Size Change: +46 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
looks like the e2e failures could be legitimate? |
8633579
to
0154bec
Compare
I broke #64392 out of this to better isolate the test failures. |
…g block selection
…he editor package
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.
This is testing good for me and the code makes sense to me, I don't know if the changes in the reducer could have other side effects but I can't think of any right now
Ok, let's bring this in. I'm sure any unintended side effects will be best discovered by people using it, and then we can revert :) |
… block or clearing block selection (#64048) * Clear the insertion point when selecting a different block or clearing block selection * Use the block insertion point in the inserter, not the the one from the editor package * use block insertion point index * Don't change the insertion point when clearing block selection * Also set the insertion point in the quick inserter Co-authored-by: scruffian <scruffian@git.wordpress.org> Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>
@scruffian It looks like there are a couple of issues that were caused:
|
Started trying to untangle this issue: #65098 |
I feel like a prophet! |
What?
Adds additional situations in which we clear the block insertion point. Fixes #63866
Why?
When a block is selected, it would be expected that the insertion point would also update to reflect the newly selected block, so we should reset the insertion point in this case.
How?
Add more actions to the insertion point reducer so that it detects when a block is selected.
Testing Instructions
Screenshots or screencast
Trunk
trunk.mov
This branch
fix.mov