Code Editor needs WARNING! #7097
Labels
Backwards Compatibility
Issues or PRs that impact backwards compatability
[Feature] Block Transforms
Block transforms from one block to another
Milestone
Is your feature request related to a problem? Please describe.
I've been really giving Gutenberg a workout for the past few months. This includes building a near 100% WYSIWYG compatible theme, as well as building a plugin with a couple of very nice blocks.
One thing I've learned in all of this work is that it is essentially impossible to use the Code Editor view of a post to make an edit without breaking a block. I think you can fiddle with classic blocks, but even the slightest change to a block triggers the "This block has been externally changed" message.
This will be a big problem for a lot of users, I suspect, especially during the transition. People are just so used to switching to the HTML view to tweak things. This will break the blocks, and it takes a while to figure out the rule "You don't directly edit blocks in the code editor!".
Describe the solution you'd like
To help people avoid this trap, I would suggest two possible approaches.
Put a hard to miss warning at the top of the code view: Do not edit any blocks with the code editor!! People can still edit, but they will have been warned and will be less surprised by breaking blocks.
Make the code view read-only. Don't know if that is a possibility, but I really believe it would be the best approach. If someone really needs to muck with a post with GB blocks, then they can use the classic editor.
Make the editor vs frontend code compaison a bit smarter - maybe skip over content and just look at the param in the block header and in the classes and styles. I suspect this would be really hard to do. I think the comparison seems to ignore white space differences, but that seems about it.
OR - is the code editor even necessary? It really serves no purpose other than maybe letting people edit classic content in the code view. But perhaps its very existence should be questioned.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
The text was updated successfully, but these errors were encountered: