-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Leverage revisions in convert to blocks action #12162
Comments
For reference, we already do something like this if a block is invalid, see #7995 Showing a pre-action view of what "Convert to blocks" would do is even better than a post-action notice! |
I like showing the difference more and just showing a warning. Even better would be a block-by-block confirmation when we can't perfectly match the HTML. In cases we can, we don't want to show anything. |
So, to elaborate on that, we when you click "convert to blocks", we run the block conversion, which first corrects HTML if needed, then transforms each top level element to a block. If the block matches the HTML that needed to be converted, we continue. If it doesn't match, we show the diff with actions to be taken by the user. And so it goes on until all is converted. One conversion may need user action multiple times. I prefer this above full conversion diff because the diff will be huge and overwhelming, and it will list false positives (blocks that mapped perfectly). |
Just thought I'd mentioned that a user on the forums mentioned the loss of content problem with 'Convert to Blocks' along with the idea of showing a comparison: The use case seems somewhat similar to when there's an invalid block, where we already support a visual diff: |
@paaljoachim @designsimply @oandregal Seeing multiple closed issues mentioning this issue, can this one be closed as well, or is there still some action needed? |
Hey Tom. Thanks for asking. I really do not know... |
@paaljoachim Thanks, in that case I'll close it for now. I tagged a few others as well, so if anyone feels the need to re-open, by all means go ahead and let me know what needs to be done! |
Is your feature request related to a problem? Please describe.
We consider "Convert to blocks" a destructive action that can be reverted: we can't guarantee perfect conversion, content may be lost although the user always has the choice to undo.
This expectation is not always clear to users, and I want to propose an approach that makes that clear while leveraging the WordPress tools we already have.
Describe the solution you'd like
After a user converts something to blocks we could show a notice saying something like:
It will include a link to the revisions page where the user can visually spot them and take action (revert). We'll use the same notice to communicate that the process was not loosey as well.
Describe alternatives you've considered
A solution floated in some conversations was to show a message before the convert to blocks action along the lines of:
I find this not very helpful and unnecessarily scary most of the times. The "Convert to blocks" logic does an impressive job at preserving content and transforming bad formatted HTML into a good one.
The text was updated successfully, but these errors were encountered: