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

Merged
merged 1 commit into from Dec 27, 2017

Conversation

Projects
None yet
5 participants
@noisysocks
Member

noisysocks commented Dec 27, 2017

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:

Before After
screen shot 2017-12-27 at 14 35 46 screen shot 2017-12-27 at 14 24 54

I also removed the category headers from the Embed and Saved tabs, which I think looks cleaner:

Before After
screen shot 2017-12-27 at 14 35 32 screen shot 2017-12-27 at 14 32 30

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 be embeds).

How to test

  1. Ensure you have no reusable blocks. You could do this by testing on a new site, running wp site empty, or executing a DELETE FROM wp_posts WHERE post_type = 'wp_block'.
  2. Open the inserter and click on Saved — you should see the message.
  3. Check that other parts of the inserter work correctly.
Add 'No saved blocks' message to Inserter
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.
@noisysocks

This comment has been minimized.

Show comment
Hide comment
@noisysocks
Member

noisysocks commented Dec 27, 2017

@jasmussen

This comment has been minimized.

Show comment
Hide comment
@jasmussen

jasmussen Dec 27, 2017

Contributor

Looks good visually! 👍

Contributor

jasmussen commented Dec 27, 2017

Looks good visually! 👍

@youknowriad

LGTM 👍

@noisysocks noisysocks merged commit 40adaff into master Dec 27, 2017

3 checks passed

codecov/project 39.18% (+0.1%) compared to c3be1b6
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@noisysocks noisysocks deleted the add/no-saved-blocks-message branch Dec 27, 2017

@aduth

This comment has been minimized.

Show comment
Hide comment
@aduth

aduth Jan 3, 2018

Member

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:

  • There are truly no blocks registered
  • There are no results for a given search
  • There are no saved blocks
Member

aduth commented Jan 3, 2018

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:

  • There are truly no blocks registered
  • There are no results for a given search
  • There are no saved blocks
@noisysocks

This comment has been minimized.

Show comment
Hide comment
@noisysocks

noisysocks Jan 3, 2018

Member

I think specific copy provides a nicer user experience, but agree that those messages should all use the same component and appear visually similar.

Member

noisysocks commented Jan 3, 2018

I think specific copy provides a nicer user experience, but agree that those messages should all use the same component and appear visually similar.

@jasmussen

This comment has been minimized.

Show comment
Hide comment
@jasmussen

jasmussen Jan 4, 2018

Contributor

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.

Contributor

jasmussen commented Jan 4, 2018

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.

@karmatosed

This comment has been minimized.

Show comment
Hide comment
@karmatosed

karmatosed Jan 4, 2018

Member

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.

Member

karmatosed commented Jan 4, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment