Skip to content
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 Preview Available' text to the inserter preview panel #17848

Merged
merged 2 commits into from
Oct 10, 2019

Conversation

brentswisher
Copy link
Contributor

Fixes #17720 based on @mapk's feedback to #17740. @youknowriad feel free to use this or not, just saw your PR in the 5.3 project and thought it was something I could take off your plate.

Description

Adds "No Preview Available." in the space where a preview would display if it existed.

How has this been tested?

Open inserter, hover over a block without a preview (video, file, etc) and see that "No Preview Available" now displays

Screenshots

Fullscreen_10_8_19__11_45_AM

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from the code point of view 👍 I guess we just need a UX approval now cc: @mapk, @karmatosed.

@youknowriad
Copy link
Contributor

I was wondering if we should keep the rounded borders we use for previews around that message? Thoughts @mapk

@karmatosed
Copy link
Member

What about using the blank state being considered for block library:

image

#17122 (comment)

@brentswisher
Copy link
Contributor Author

To me, a question mark implies that I have done something as a user that the system doesn't understand. That makes sense in the context of searching for something that doesn't exist. In this context though there just is not a preview - It's not changeable or fixable by the user. Put another way, there isn't any action a user can take to answer the "question" the system is posing to them. If that makes sense?

If there's concensus I'm happy to implement, just my thoughts.

@youknowriad
Copy link
Contributor

Capture d’écran 2019-10-10 à 10 23 29 AM

I tweaked the design a bit with borders to match the style of the other blocks (the ones with previews available). I think it's better this way.

@youknowriad youknowriad merged commit c32ab27 into master Oct 10, 2019
@youknowriad youknowriad deleted the add/inserter-no-preview-text branch October 10, 2019 09:32
@youknowriad youknowriad added this to the Gutenberg 6.7 milestone Oct 14, 2019
@mapk
Copy link
Contributor

mapk commented Oct 14, 2019

Thanks, @youknowriad! Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Inserter Help Panel look a bit broken if the block doesn't have any attached example
5 participants