WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.36k stars 4.14k forks source link

Update copy of warning for block removal #52392

Closed annezazu closed 8 months ago

annezazu commented 1 year ago

Looking over 6.3 beta 3 and the warning for block removal work https://github.com/WordPress/gutenberg/pull/51145, the copy/layout feels like it can be iterated upon as there's a bit of awkward spacing otherwise with items being on two lines:

Screen Shot 2023-07-06 at 12 05 07 PM

Here's the text for Query Loop:

Are you sure?

Query Loop displays a list of posts or pages.

Removing this block is not advised.

Here's the text for Post Content:

Are you sure?

Post Content displays the content of a post or page.

Removing this block is not advised.

To start, let's not have two separate lines as it makes the spacing a bit awkward.

Idea for Query Loop

Are you sure?

The Query Loop block displays a list of posts or pages. Removing this block will cause your posts or pages to not be displayed in this template.

Idea for Post Content:

Are you sure?

The Post Content block displays the content of a post or page. Removing this block will cause the contents of your post or page to not show.

We could also perhaps keep the "Removing this block is not advised" text depending on how much space we want to use up/how much text we want to show. Keen to get copy help!

provenself commented 1 year ago

Totally agree on the spacing—I do think we could reinstate the "not advised" bit without affecting the overall length by much, though. How do you feel about these?

Query Loop

Are you sure?

The Query Loop block displays a list of posts or pages. Removing this block will prevent your posts or pages from appearing in this template, and is not advised.

Post Content

Are you sure?

The Post Content block displays the content of a post or page. Removing this block will prevent the content from displaying, and is not advised.

annezazu commented 1 year ago

Sounds great. Let's roll with what you have!

annezazu commented 1 year ago

With beta 4 tomorrow, I don't anticipate there being time to get this done alongside the large list of to dos. Removing from the 6.3 board for now.

richtabor commented 1 year ago

I’m of the mind that folks won’t read this aside from the “Are you sure?” heading - so it can be less detailed.

I also think the text shouldn’t read it is “not advised”. We don’t have enough context to suggest whether or not it’s a good idea to remove.

For example, I use a Query Loop block within a template part on my blog and I keep getting this notice when removing. It’s irrelevant whether or not it’s removed from my single template, but the UI advises me not to.

foosantos commented 1 year ago

I checked how this was added technically, and "Removing this block is not advised." is added by default on all block removal warning models.

I believe that part of the reason that it was added in this more "generic" way is to be able to loop and show a list with all warnings in case the user tries to delete multiple blocks:

Screenshot 2023-09-22 at 00 31 46

In this case, I would suggest us to do the following:

annezazu commented 9 months ago

While this PR is close to landing, I wanted to recap the feedback and discussion there:

Various options were thrown out as well:

We landed with the following for multiple blocks selected (and you can infer single blocks). This offers a clearer heading warning, more concise language, and clearer communication around the impact:

Screenshot 2023-12-06 at 10 56 57 AM

This is very likely to need iteration so, once this change ships to GB, please keep sharing feedback so we can get this right.

cc @foosantos @sethmclellana8c @donalirl @hanneslsm

annezazu commented 9 months ago

Keeping this open for future feedback as I have a sense we can continue to iterate (quickly) here 👏🏼 Please keep sharing what's coming up and what anyone sees when working with the Site Editor or working with others to help them use the Site Editor.

tanjoymor commented 9 months ago

Is the goal to have "one" warning for different types of blocks (such as Content block, Query Loop block, and Post Template block)?

If possible, I'd advise against that. I think specificity matters in this situation.

I'd also suggest that we get a "Learn more" added to this that links to documentation about the specific block, where the documentation can properly explain what the block is for, how it works, and what exactly is happening when it's deleted.

To steal from here and here, and add another tweak, another option to satisfy both of my suggestions above could be:

Post or page content will not be displayed if you delete the Content block, Query Loop block, or the Post Template block.

and link each of the block names to their respective user documentation. Or, maybe link to a tutorial in Learn WordPress that specifically digs into the function of these blocks and the consequences of deleting them from a template.

Yes, the text is longer and will likely wrap onto two lines (but only if we're trying to create one modal for all three use cases), and this feels clearer while giving the user the ability to easily learn why this matters.

annezazu commented 9 months ago

Is the goal to have "one" warning for different types of blocks (such as Content block, Query Loop block, and Post Template block)?

Quick respsonse: No! The goal is to reduce folks deleting these blocks and breaking their site.

Keep the feedback coming as this lands in Gutenberg and we can hopefully help determine if this helps/hurts.

liviopv commented 8 months ago

Ideas for the removal warning copy

Ideas for the Content Block placeholder copy

Another aspect we should also aim to improve to reduce confusion is the copy and design of the placeholder text in the Content Block, and, possibly the Title Block, which touches on larger aspected being discussed on https://github.com/WordPress/gutenberg/issues/55025

Ideas for the Removal warning design

Ideas for the Content Block placeholder design

Add more visual distinction to the Content Block to indicate that it is a special block. this could be done by:

annezazu commented 8 months ago

Thanks so much for gathering up this feedback! I'm getting some conflicting messages here between "reduce the amount of information" and recommendations to add in sentences. I err on the side of keeping it very concise based on prior feedback and appreciate the personalization angle along with not naming the block specifically. As for listing out where the pages and posts are, that won't quite hold up considering you can also add pages in the Site Editor itself :).

Use "this block" instead of "Content Block"

We do this right now with the updated copy.

Include a link to core documentation: https://wordpress.org/documentation/article/post-content-block/

I like this! The issue is that when deleting multiple blocks, we'd have to link to all of the docs/get the docs right. I don't think we can do this elegantly, unless we created a dedicated to doc to this topic.

Switch focus between the “Cancel” and “Delete” buttons to indicate that “Cancel” is the most reasonable action, if this doesn't cause an accessibility issue.

To me, this is a no go based on what the primary action is and it goes against every other use of cancel in the interface in terms of a design pattern.

For the post content placeholder, I've opened this issue to make sure we don't lose that feedback in the midst of this broader discussion: https://github.com/WordPress/gutenberg/issues/58136

As a next step, let's try a PR that adds in "you" language and brings back the "Removing this block is not advised." that was originally there. We tried super concise and perhaps that's still needed:

annezazu commented 8 months ago

Opened a PR to kick this off: https://github.com/WordPress/gutenberg/pull/58138

richtabor commented 8 months ago

What about this; a bit more direct and succinct:

Deleting these blocks will remove your post or page content. It is not recommended.

Plugged the previous suggestion into chatGPT for something more readable/understandable.

richtabor commented 8 months ago

alternate: Deleting these blocks will stop your post or page content from displaying on this template. It is not recommended.

annezazu commented 8 months ago

Deleting these blocks will remove your post or page content. It is not recommended.

This reads like my posts/pages will be deleted to me.

Deleting these blocks will stop your post or page content from displaying on this template. It is not recommended.

This is a fine alternative! I don't see it as materially better but I don't feel strongly. @liviopv in case you have any strong feelings :)

annezazu commented 8 months ago

With this PR merged, let's take a look at this next iteration:

Here's where we are at visually:

299122431-bc549039-6ecb-466f-98cc-40ddb6fd258a

As before, let's keep feedback coming here and see what sort of iterations might be needed.

Thank you to everyone for the help here. @liviopv for the feedback, @richtabor for wordsmithing/diving into the PR, @andrewserong for bringing it across the finish line.

richtabor commented 8 months ago

Looks good; closing for now as https://github.com/WordPress/gutenberg/pull/58138 is in.