-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add 'No saved blocks' message to Inserter #4182
Conversation
When there are no Reusable Blocks available to add, and the user selects 'Saved' in the Inserter, display a message instead of a completely blank tab.
Looks good visually! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There's redundancy / inconsistency between this and #4040. Do we really need a custom message to explain that there's no saved blocks, or could we simplify to a standard "No blocks found" for all of the following cases:
|
I think specific copy provides a nicer user experience, but agree that those messages should all use the same component and appear visually similar. |
Though I agree a customized message is a nicer user experience, I would agree with aduth that it would be nice to simplify as much as we can, and if we can simplify the code by reusing an existing message, I think we should do that. |
I would +1 for simplifying. If we have time adding in customized messages in a lot of places would be amazing, but for now lets go with simple implementation. |
Fixes #3994.
Previously, a brand new user would encounter a completely blank tab when selecting the Saved tab in the inserter.
I've fixed this by adding a simple message that indicates that there are no saved blocks:
I also removed the category headers from the Embed and Saved tabs, which I think looks cleaner:
I assume that this was the intended design based on the presence of an
if ( 'embed' === tab )
check that was never executing (because of a typo: it should beembeds
).How to test
wp site empty
, or executing aDELETE FROM wp_posts WHERE post_type = 'wp_block'
.