WordPress / gutenberg

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

Proposal: Add snackbar notification when unlocking content only blocks #61554

Open richtabor opened 2 months ago

richtabor commented 2 months ago

Perhaps there is a persistent snackbar that renders when you opt to unlock a content-only locked block.

This would allow you to easily re-lock a temporarily unlocked block, instead of having to find the "Done" control on the parent locked block. I'd expect that selecting "Done" in the block toolbar of the parent block would dismiss the snackbar, and clicking the "Lock" call the action would re-lock the block and dismiss the snackbar.

Perhaps the copy needs refinement, but I think it's an interesting approach to be able to easily re-lock a recently unlocked content-only block.

CleanShot 2024-05-10 at 13 47 52

I thought of this while reviewing https://github.com/WordPress/gutenberg/pull/61127.

kevin940726 commented 2 months ago

I don't think there's a way to add persistent snackbars for now, so that will have to be implemented separately. Do you think it's still worth it when the snackbar automatically dismisses itself after a timeout?

talldan commented 2 months ago

Two things I've been thinking about in relation to this:

kevin940726 commented 2 months ago

There's also a notice style which seems more like a prompt message.

image

I guess this is only meant to be a secondary way to access the "Done" action in the block toolbar after all, so either UI should help. A better UX can be redesigned in the future. We just want to make sure that the advantages outweigh the disadvantages.

kevin940726 commented 2 months ago

I opened https://github.com/WordPress/gutenberg/pull/61845 to help testing and figure out a better UX.