-
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
Handle unrecognized blocks without modifying their markup #1735
Comments
See also #1394, which also helps avoiding modifications and adding classes. |
Also see #1175 for some additional context to this problem. That issue wasn't intended on turning into a discussion about using The fact that we forget about the document structure when we save could be seen as a positive and negative at the same time I think. The worst bit is what you point out: we are way to jumpy on turning things into Instead of this behavior I would love to "preserve the broken structure" and give the author the choice when the author decides to edit it. That means, for the sake of rendering the post in the editor we can treat it as if it were a freeform block and maybe even indicate that it's broken (some kind of graying? a warning indicator?). Once we enter into that block to edit it we can present the choice: "We had a problem determining how this block should be edited…(a) maybe there is a plugin missing to handle the the problem extends beyond block type but also to attributes. for example, if we leave out the quotes on the JSON attributes then the whole set of attributes will be wiped out. |
Some effort toward this goal at #1929 |
The same mechanism as #1929 can work here, but it's not working yet. To verify, create a post with this content: <!-- wp:core/not-implemented-yet /-->
<!-- wp:core/not-implemented-yet -->
abc
<!-- /wp:core/not-implemented-yet --> Edit it in Gutenberg, and see that the empty block is removed and the other one changes to a <!-- wp:core/freeform -->
abc
<!-- /wp:core/freeform --> (This also happens without the post being marked as dirty, which seems less than ideal but may be a separate issue.) |
Related #2126. |
While developing a demo plugin for #1619 and renaming blocks as their desired implementation becomes more clear, the user experience of blocks that are no longer recognized is quite bad. They are turned into
core/freeform
blocks on saving, without any indication of what is going on.We need to find a way to show in the UI that an "unrecognized" block was detected, and avoid modifying it.
The text was updated successfully, but these errors were encountered: