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

Gutenberg: Change primary action to Attempt Block Recovery #38329

Open
1 of 2 tasks
gwwar opened this issue Dec 11, 2019 · 3 comments
Open
1 of 2 tasks

Gutenberg: Change primary action to Attempt Block Recovery #38329

gwwar opened this issue Dec 11, 2019 · 3 comments
Labels
[Goal] Gutenberg Working towards full integration with Gutenberg [Type] Enhancement

Comments

@gwwar
Copy link
Contributor

gwwar commented Dec 11, 2019

Breaking out an actionable piece of #37230

This is a two parter:

  • Open a try PR in Gutenberg that does the same thing. We're not sure if the community is interested in this, but we can see!
  • Create a wpcom customization that makes Attempt Block Recovery the primary action Edit: (Likely no longer needed for now with Gutenberg: autofix block validation issues on editor load #38397 landed)

Context

When a block parses HTML markup, it also tries to validate the data by re-serializing and comparing the result. Unfortunately blocks currently compare with an exact string match. Even a small whitespace for change for completely equivalent markup/styling, is enough to cause the following scary error:

Screen Shot 2019-10-31 at 10 21 49 AM

Clicking on the primary action usually isn't what the user wants. It converts the previously nice to understand block into a plain HTML block:

Screen Shot 2019-10-31 at 10 21 56 AM

The best action is usually "Attempt Block Recovery" or "Convert to Blocks"

Screen Shot 2019-10-31 at 10 23 29 AM

Traditionally WP allows manipulation of content from a variety of filters/customizations, so this is a very easy case to fall into.

@jeraldjuice
Copy link

Closing this for now, based on ongoing discussion in WordPress/gutenberg#19188

@gwwar gwwar reopened this Jan 2, 2020
@gwwar
Copy link
Contributor Author

gwwar commented Jan 2, 2020

Please keep this one, as my try PR is very unlikely to make it in ;)

@jeraldjuice jeraldjuice removed their assignment Jan 22, 2020
@github-actions
Copy link

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Goal] Gutenberg Working towards full integration with Gutenberg [Type] Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants