WordPress / gutenberg

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

View options: Distraction free is the only option to trigger a snackbar notice #66364

Open afercia opened 3 days ago

afercia commented 3 days ago

Description

In the top bar 'Options' ellipsis menu, the first 4 options are related to 'view modes' of the editor:

Image

The 'Distraction free' mode is the only one to trigger a snackbar notice. The other ones don't.

Image

The snackbar notice is a little unexpected to me. Also, not sure how the 'Undo' control in the notice is any valuable, given the Options menu is still open and users can just click again there to undo.

On top of that, activating and deactivating these options triggers an audible speak message for screen reader users. However, the message for distraction free mode is duplicated. Actually, two different components trigger a message for this same feature. Also, the wording of the message is inconsistent.

Screenshot when dumping all the speak messages to the console:

Image

Proposal

Either all these options should trigger a snackbar notice or none. I'd like to propose to remove the snackbar notice of the Distraction free mode for consistency and simplicity. I'm not sure this snackbar notice adds much value.

Note: recommended to check what happens when toggling these options via the Command palette.

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Please confirm which theme type you used for testing.

Vrishabhsk commented 2 days ago

Hi @afercia 👋

Let me know your thoughts on this. Thanks

ntsekouras commented 1 day ago

To add some context, the snackbar was added for distraction free mode because it can be triggered in various conditions besides this toggle. We should definitely keep only one from the action.

So, if we want consistency @Vrishabhsk 's approach to add to the others is the way only way to go.