-
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
Pagination blocks require being deleted twice to be removed #41178
Comments
I can reproduce this, but I also think it is working as intended? |
When you remove all 3 blocks then probably it restores the default template for the Pagination block defined here: gutenberg/packages/block-library/src/query-pagination/edit.js Lines 56 to 64 in 0da4e25
I wouldn't call it an obvious bug because it is expected behavior when you have inner blocks with some predefined initial state. For example, for the Query Loop block, we prevent the same behavior by introducing the setup step:
Let me summarize the behavior:
Although, now I find it surprising that when you remove all the blocks for the second time it no longer injects inner blocks. I will test it, as my expectation is that once you save the content in the current form and refresh the page, then the editor should bring back all the default blocks Edit: I can confirm that inner blocks were restored for the Pagination block after reloading the editor. In my case, I also didn't have to remove inner blocks twice. So the current handling is buggy but overall it works the way it should 😅 |
Ahh interesting! I was wondering if it was some sort of container issue. Thanks for changing to enhancement as it's a confusing UX to say the least and we can likely improve that initial setup state to make clearer what's going on. |
I actually changed back to a bug, but it's both to be honest 😅 |
What do you think would be the desired result here? In general the first time you delete the innerBlocks, they're shown again, because of a check we have about |
I'm not quite sure! I'd be keen to hear some design thought. Right now though, there's nothing to indicate why a first pass deletion didn't work and why the placeholders returned. To me, it inherently felt broken and was frustrating to delete three things only to have them all pop back up seemingly spontaneously. |
I'm sure I remember seeing this reported for the buttons block too, but I can't find it now. |
That's the one 😄 |
Description
This occurs both with 13.2.2 and, more concerning, 6.0 RC 3. Essentially in order to properly remove pagination blocks, you have to delete them twice. Nothing this for a minor release since we're tight on time but cc @ndiego and @gziolo for potentially more thoughts in case there's an easy fix ahead of RC4 tomorrow.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
double.delete.mov
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: