-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Columns block] Unexpected behavior while decreasing number of columns #7149
Comments
This was discussed previously in a different issue, and it was decided to keep this behavior. The content can be removed manually. |
@GlennMartin1 do you have a link to that issue? |
It's also worth noting that this issue exists in all InnerBlocks implementations. If you're programatically managing your InnerBlocks layout areas, removing a layout area does not remove the corresponding HTML. |
I just spent 10 minutes looking for that conversation, but I can't locate it - sorry. |
@GlennMartin1 I've also been looking and can't find it either. Maybe it happened in Slack, and not a GitHub issue? I think it's worth considering this a bug, or at least an opportunity for improvement. Asking users to manually manage HTML, especially given how easy it is to break Gutenberg when manually editing HTML (see #6826 and #7097), is a recipe for fragility. I think it's reasonable for an end user to expect that removing a column (or any InnerBlocks layout area) will remove the corresponding content. |
Keeping this content also poses even more issues for WordPress search. For example, If the removed column contained information about kazoos, and kazoos are mentioned nowhere else on the page, when a user runs a search at http://example.com?s=kazoos, the page will show up, despite having no kazoo-related content. |
I agree this should be a bug, I don't remember the specifics of past conversations. I think at some point Columns retained the content during the editor session, so that if you removed one by mistake, it would still be easily restorable as you drag the column count. But after that it should not be saved. |
Also it should be possible to remove a particular column in midst the other columns or |
This seems like a duplicate of #7149 (or the other way around). I'm going to close this one. |
I realised that when the number of columns of Column (beta) block is decreased, the Visual Editor is updated correctly but the parsed HTML isn't.
To Reproduce
Screenshots
Desktop
The text was updated successfully, but these errors were encountered: