Skip to content
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

Code Editor needs WARNING! #7097

Closed
weavertheme opened this issue Jun 2, 2018 · 2 comments
Closed

Code Editor needs WARNING! #7097

weavertheme opened this issue Jun 2, 2018 · 2 comments
Assignees
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Block Transforms Block transforms from one block to another

Comments

@weavertheme
Copy link

weavertheme commented Jun 2, 2018

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

@danielbachhuber
Copy link
Member

Hi @weavertheme,

Thanks for the report! I'm going to dive into this over the next few days. I'll report back when I have more to share.

@danielbachhuber
Copy link
Member

Closing in favor of #6826, where we'll do a round of UX improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Block Transforms Block transforms from one block to another
Projects
None yet
Development

No branches or pull requests

2 participants