Gutenberg: Iterate on convert block message and actions

Created on 26 Sep 2019  路  5Comments  路  Source: WordPress/gutenberg

If a block has issues and needs to be converted, you see the following:

image

I would love to see how this could be iterated. For example, do we need to hide actions behind a drop-down? Could resolve just be the option and 'best option' by default?

Good First Issue [Type] Copy

Most helpful comment

Definitely some confusion around this. After talking about this in today's Design Team slack meeting, there was a desire to improve the interaction. Some questions we had included:

  1. Shouldn't the block try to "resolve" automatically? If so, then why is there a "Resolve" button?
  2. What's the difference between "Resolve" and "Attempt Block Recovery"?

Let's iterate on this. 馃憤

All 5 comments

Definitely some confusion around this. After talking about this in today's Design Team slack meeting, there was a desire to improve the interaction. Some questions we had included:

  1. Shouldn't the block try to "resolve" automatically? If so, then why is there a "Resolve" button?
  2. What's the difference between "Resolve" and "Attempt Block Recovery"?

Let's iterate on this. 馃憤

In my experience the difference between "resolve" and "attempt block recovery" is that "resolve" almost never works and "attempt block recovery" has never failed me. I'm not at all sure what they do under the covers, but I am puzzled that WP does not automatically give "attempt block recovery" a try before complaining at all. (See issue #16425)

As mentioned, there's some overlap between this and https://github.com/WordPress/gutenberg/issues/16425.

I don't see any barriers to making 'Attempt Block Recovery' the more prominent option. A question would be whether the diff should/could be used when using 'Attempt Block Recovery':
Screenshot 2020-04-21 at 2 30 20 pm

Other less used options could potentially be moved to the block settings menu, which is already quite contextual about which options are shown.

Shouldn't the block try to "resolve" automatically? If so, then why is there a "Resolve" button?

I think this is protecting against unexpected data loss, e.g. if the user has edited their HTML outside the block editor, reloading that post and automatically resolving could result in the content being changed.

What's the difference between "Resolve" and "Attempt Block Recovery"?

Good question!

It looks like Attempt Block Recovery tries to recreate the block from scratch using the block attributes that the editor was able to recover/parse. This option seems like it could result in some lost data if the attributes couldn't be parsed, but at least the correct block will be created.

It looks like Convert To Blocks treats the HTML almost as though it was pasted content. I've noticed sometimes with this option that invalid columns/gallery blocks can be converted to list blocks, so that might explain why鈥攊t might be ignoring the type of block and is trying to 'guess' what type the content is.

A question would be whether the diff should/could be used when using 'Attempt Block Recovery':

I think that's a more advanced option that can be integrated down the road.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ellatrix picture ellatrix  路  3Comments

davidsword picture davidsword  路  3Comments

wpalchemist picture wpalchemist  路  3Comments

JohnPixle picture JohnPixle  路  3Comments

nylen picture nylen  路  3Comments