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

Block Directory: Update search results list UI #25521

Merged
merged 4 commits into from
Mar 2, 2021
Merged

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Sep 21, 2020

Description

See #22149 (comment) — Start implementing the new UI for block directory searches, showing block directory results even when installed blocks are found. This deviates a little from the original mockup due to issues with the BlockPreview component (requires blocks to be installed).

Fixes #22149, fixes #23894

How has this been tested?

Search for blocks in the inserter, both installed and from the directory.
Make sure everything works as expected.

Screenshots

Searching for a term that matches local blocks, block patterns, and installable blocks shows the local blocks and patterns as expected, and puts the installable blocks behind a button:

Screen Shot 2021-01-12 at 6 17 58 PM

Once clicked, the blocks show up in a list, and each is clickable to install & insert:

Screen Shot 2021-01-12 at 6 18 10 PM

Installing state:

Screen Shot 2021-01-12 at 6 18 27 PM

No local blocks but there is a block directory result, skips the button and displays the installable block(s):

Screen Shot 2021-01-12 at 6 18 51 PM

No local blocks or block directory blocks, uses the empty state:

Screen Shot 2021-01-12 at 6 20 01 PM

Error installing a block greys out the block, and shows a banner notice. The block stays greyed out on subsequent searches, but installing other blocks should still work. I would love a designer's help to make it more obvious what happened, with a more accessible design than lowering the contrast.

Screen Shot 2021-01-13 at 2 56 55 PM

@ryelle ryelle self-assigned this Sep 21, 2020
@ryelle ryelle added the [Feature] Block Directory Related to the Block Directory, a repository of block plugins label Sep 21, 2020
@github-actions
Copy link

github-actions bot commented Sep 21, 2020

Size Change: -490 B (0%)

Total Size: 1.39 MB

Filename Size Change
build/a11y/index.js 1.14 kB +1 B (0%)
build/annotations/index.js 3.79 kB +2 B (0%)
build/block-directory/index.js 8.63 kB -471 B (-5%)
build/block-directory/style-rtl.css 1 kB -6 B (-1%)
build/block-directory/style.css 1.01 kB -5 B (0%)
build/block-editor/index.js 125 kB +7 B (0%)
build/block-library/index.js 148 kB -4 B (0%)
build/blocks/index.js 48.3 kB -1 B (0%)
build/components/index.js 273 kB -3 B (0%)
build/compose/index.js 11.1 kB -1 B (0%)
build/core-data/index.js 16.8 kB -1 B (0%)
build/customize-widgets/index.js 4.09 kB +1 B (0%)
build/data/index.js 8.86 kB -1 B (0%)
build/date/index.js 31.8 kB +1 B (0%)
build/dom/index.js 4.95 kB -1 B (0%)
build/edit-post/index.js 307 kB +3 B (0%)
build/edit-site/index.js 27.1 kB +1 B (0%)
build/edit-widgets/index.js 20.2 kB -8 B (0%)
build/editor/index.js 42.1 kB -5 B (0%)
build/format-library/index.js 6.78 kB +3 B (0%)
build/is-shallow-equal/index.js 698 B -1 B (0%)
build/keyboard-shortcuts/index.js 2.54 kB +1 B (0%)
build/media-utils/index.js 5.36 kB -1 B (0%)
build/primitives/index.js 1.42 kB -1 B (0%)
build/priority-queue/index.js 790 B -1 B (0%)
build/reusable-blocks/index.js 3.81 kB -1 B (0%)
build/rich-text/index.js 13.5 kB +2 B (0%)
build/url/index.js 3.02 kB +1 B (0%)
build/viewport/index.js 1.86 kB -1 B (0%)
ℹ️ View Unchanged
Filename Size Change
build/api-fetch/index.js 3.4 kB 0 B
build/autop/index.js 2.84 kB 0 B
build/blob/index.js 665 B 0 B
build/block-editor/style-rtl.css 12.1 kB 0 B
build/block-editor/style.css 12.1 kB 0 B
build/block-library/blocks/archives/editor-rtl.css 61 B 0 B
build/block-library/blocks/archives/editor.css 60 B 0 B
build/block-library/blocks/audio/editor-rtl.css 58 B 0 B
build/block-library/blocks/audio/editor.css 58 B 0 B
build/block-library/blocks/audio/style-rtl.css 103 B 0 B
build/block-library/blocks/audio/style.css 103 B 0 B
build/block-library/blocks/block/editor-rtl.css 161 B 0 B
build/block-library/blocks/block/editor.css 161 B 0 B
build/block-library/blocks/button/editor-rtl.css 475 B 0 B
build/block-library/blocks/button/editor.css 474 B 0 B
build/block-library/blocks/button/style-rtl.css 479 B 0 B
build/block-library/blocks/button/style.css 479 B 0 B
build/block-library/blocks/buttons/editor-rtl.css 315 B 0 B
build/block-library/blocks/buttons/editor.css 315 B 0 B
build/block-library/blocks/buttons/style-rtl.css 364 B 0 B
build/block-library/blocks/buttons/style.css 363 B 0 B
build/block-library/blocks/calendar/style-rtl.css 208 B 0 B
build/block-library/blocks/calendar/style.css 208 B 0 B
build/block-library/blocks/categories/editor-rtl.css 84 B 0 B
build/block-library/blocks/categories/editor.css 83 B 0 B
build/block-library/blocks/categories/style-rtl.css 79 B 0 B
build/block-library/blocks/categories/style.css 79 B 0 B
build/block-library/blocks/code/style-rtl.css 90 B 0 B
build/block-library/blocks/code/style.css 90 B 0 B
build/block-library/blocks/columns/editor-rtl.css 190 B 0 B
build/block-library/blocks/columns/editor.css 190 B 0 B
build/block-library/blocks/columns/style-rtl.css 421 B 0 B
build/block-library/blocks/columns/style.css 421 B 0 B
build/block-library/blocks/cover/editor-rtl.css 390 B 0 B
build/block-library/blocks/cover/editor.css 389 B 0 B
build/block-library/blocks/cover/style-rtl.css 1.25 kB 0 B
build/block-library/blocks/cover/style.css 1.25 kB 0 B
build/block-library/blocks/embed/editor-rtl.css 486 B 0 B
build/block-library/blocks/embed/editor.css 486 B 0 B
build/block-library/blocks/embed/style-rtl.css 396 B 0 B
build/block-library/blocks/embed/style.css 395 B 0 B
build/block-library/blocks/file/editor-rtl.css 199 B 0 B
build/block-library/blocks/file/editor.css 198 B 0 B
build/block-library/blocks/file/style-rtl.css 248 B 0 B
build/block-library/blocks/file/style.css 248 B 0 B
build/block-library/blocks/freeform/editor-rtl.css 2.45 kB 0 B
build/block-library/blocks/freeform/editor.css 2.45 kB 0 B
build/block-library/blocks/gallery/editor-rtl.css 689 B 0 B
build/block-library/blocks/gallery/editor.css 690 B 0 B
build/block-library/blocks/gallery/style-rtl.css 1.07 kB 0 B
build/block-library/blocks/gallery/style.css 1.06 kB 0 B
build/block-library/blocks/group/editor-rtl.css 318 B 0 B
build/block-library/blocks/group/editor.css 317 B 0 B
build/block-library/blocks/group/style-rtl.css 57 B 0 B
build/block-library/blocks/group/style.css 57 B 0 B
build/block-library/blocks/heading/editor-rtl.css 129 B 0 B
build/block-library/blocks/heading/editor.css 129 B 0 B
build/block-library/blocks/heading/style-rtl.css 76 B 0 B
build/block-library/blocks/heading/style.css 76 B 0 B
build/block-library/blocks/html/editor-rtl.css 281 B 0 B
build/block-library/blocks/html/editor.css 281 B 0 B
build/block-library/blocks/image/editor-rtl.css 717 B 0 B
build/block-library/blocks/image/editor.css 716 B 0 B
build/block-library/blocks/image/style-rtl.css 477 B 0 B
build/block-library/blocks/image/style.css 478 B 0 B
build/block-library/blocks/latest-comments/editor-rtl.css 159 B 0 B
build/block-library/blocks/latest-comments/editor.css 158 B 0 B
build/block-library/blocks/latest-comments/style-rtl.css 269 B 0 B
build/block-library/blocks/latest-comments/style.css 269 B 0 B
build/block-library/blocks/latest-posts/editor-rtl.css 137 B 0 B
build/block-library/blocks/latest-posts/editor.css 137 B 0 B
build/block-library/blocks/latest-posts/style-rtl.css 523 B 0 B
build/block-library/blocks/latest-posts/style.css 522 B 0 B
build/block-library/blocks/list/editor-rtl.css 65 B 0 B
build/block-library/blocks/list/editor.css 65 B 0 B
build/block-library/blocks/list/style-rtl.css 63 B 0 B
build/block-library/blocks/list/style.css 63 B 0 B
build/block-library/blocks/media-text/editor-rtl.css 191 B 0 B
build/block-library/blocks/media-text/editor.css 191 B 0 B
build/block-library/blocks/media-text/style-rtl.css 535 B 0 B
build/block-library/blocks/media-text/style.css 532 B 0 B
build/block-library/blocks/more/editor-rtl.css 434 B 0 B
build/block-library/blocks/more/editor.css 434 B 0 B
build/block-library/blocks/navigation-link/editor-rtl.css 681 B 0 B
build/block-library/blocks/navigation-link/editor.css 683 B 0 B
build/block-library/blocks/navigation-link/style-rtl.css 694 B 0 B
build/block-library/blocks/navigation-link/style.css 692 B 0 B
build/block-library/blocks/navigation/editor-rtl.css 1.34 kB 0 B
build/block-library/blocks/navigation/editor.css 1.34 kB 0 B
build/block-library/blocks/navigation/style-rtl.css 213 B 0 B
build/block-library/blocks/navigation/style.css 214 B 0 B
build/block-library/blocks/nextpage/editor-rtl.css 395 B 0 B
build/block-library/blocks/nextpage/editor.css 395 B 0 B
build/block-library/blocks/page-list/editor-rtl.css 214 B 0 B
build/block-library/blocks/page-list/editor.css 214 B 0 B
build/block-library/blocks/page-list/style-rtl.css 527 B 0 B
build/block-library/blocks/page-list/style.css 526 B 0 B
build/block-library/blocks/paragraph/editor-rtl.css 109 B 0 B
build/block-library/blocks/paragraph/editor.css 109 B 0 B
build/block-library/blocks/paragraph/style-rtl.css 288 B 0 B
build/block-library/blocks/paragraph/style.css 289 B 0 B
build/block-library/blocks/post-author/editor-rtl.css 209 B 0 B
build/block-library/blocks/post-author/editor.css 209 B 0 B
build/block-library/blocks/post-author/style-rtl.css 183 B 0 B
build/block-library/blocks/post-author/style.css 184 B 0 B
build/block-library/blocks/post-comments-form/style-rtl.css 250 B 0 B
build/block-library/blocks/post-comments-form/style.css 250 B 0 B
build/block-library/blocks/post-content/editor-rtl.css 139 B 0 B
build/block-library/blocks/post-content/editor.css 139 B 0 B
build/block-library/blocks/post-excerpt/editor-rtl.css 73 B 0 B
build/block-library/blocks/post-excerpt/editor.css 73 B 0 B
build/block-library/blocks/post-featured-image/editor-rtl.css 338 B 0 B
build/block-library/blocks/post-featured-image/editor.css 338 B 0 B
build/block-library/blocks/post-featured-image/style-rtl.css 100 B 0 B
build/block-library/blocks/post-featured-image/style.css 100 B 0 B
build/block-library/blocks/preformatted/style-rtl.css 63 B 0 B
build/block-library/blocks/preformatted/style.css 63 B 0 B
build/block-library/blocks/pullquote/editor-rtl.css 183 B 0 B
build/block-library/blocks/pullquote/editor.css 183 B 0 B
build/block-library/blocks/pullquote/style-rtl.css 316 B 0 B
build/block-library/blocks/pullquote/style.css 316 B 0 B
build/block-library/blocks/query-loop/editor-rtl.css 90 B 0 B
build/block-library/blocks/query-loop/editor.css 89 B 0 B
build/block-library/blocks/query-loop/style-rtl.css 315 B 0 B
build/block-library/blocks/query-loop/style.css 317 B 0 B
build/block-library/blocks/query-pagination-numbers/editor-rtl.css 122 B 0 B
build/block-library/blocks/query-pagination-numbers/editor.css 121 B 0 B
build/block-library/blocks/query-pagination/editor-rtl.css 270 B 0 B
build/block-library/blocks/query-pagination/editor.css 262 B 0 B
build/block-library/blocks/query-pagination/style-rtl.css 168 B 0 B
build/block-library/blocks/query-pagination/style.css 168 B 0 B
build/block-library/blocks/query/editor-rtl.css 814 B 0 B
build/block-library/blocks/query/editor.css 812 B 0 B
build/block-library/blocks/quote/editor-rtl.css 61 B 0 B
build/block-library/blocks/quote/editor.css 61 B 0 B
build/block-library/blocks/quote/style-rtl.css 169 B 0 B
build/block-library/blocks/quote/style.css 169 B 0 B
build/block-library/blocks/rss/editor-rtl.css 201 B 0 B
build/block-library/blocks/rss/editor.css 202 B 0 B
build/block-library/blocks/rss/style-rtl.css 290 B 0 B
build/block-library/blocks/rss/style.css 290 B 0 B
build/block-library/blocks/search/editor-rtl.css 165 B 0 B
build/block-library/blocks/search/editor.css 165 B 0 B
build/block-library/blocks/search/style-rtl.css 342 B 0 B
build/block-library/blocks/search/style.css 344 B 0 B
build/block-library/blocks/separator/editor-rtl.css 99 B 0 B
build/block-library/blocks/separator/editor.css 99 B 0 B
build/block-library/blocks/separator/style-rtl.css 236 B 0 B
build/block-library/blocks/separator/style.css 236 B 0 B
build/block-library/blocks/shortcode/editor-rtl.css 504 B 0 B
build/block-library/blocks/shortcode/editor.css 504 B 0 B
build/block-library/blocks/site-logo/editor-rtl.css 201 B 0 B
build/block-library/blocks/site-logo/editor.css 201 B 0 B
build/block-library/blocks/site-logo/style-rtl.css 115 B 0 B
build/block-library/blocks/site-logo/style.css 115 B 0 B
build/block-library/blocks/social-link/editor-rtl.css 164 B 0 B
build/block-library/blocks/social-link/editor.css 165 B 0 B
build/block-library/blocks/social-links/editor-rtl.css 696 B 0 B
build/block-library/blocks/social-links/editor.css 696 B 0 B
build/block-library/blocks/social-links/style-rtl.css 1.32 kB 0 B
build/block-library/blocks/social-links/style.css 1.32 kB 0 B
build/block-library/blocks/spacer/editor-rtl.css 317 B 0 B
build/block-library/blocks/spacer/editor.css 317 B 0 B
build/block-library/blocks/spacer/style-rtl.css 48 B 0 B
build/block-library/blocks/spacer/style.css 48 B 0 B
build/block-library/blocks/subhead/editor-rtl.css 99 B 0 B
build/block-library/blocks/subhead/editor.css 99 B 0 B
build/block-library/blocks/subhead/style-rtl.css 80 B 0 B
build/block-library/blocks/subhead/style.css 80 B 0 B
build/block-library/blocks/table/editor-rtl.css 478 B 0 B
build/block-library/blocks/table/editor.css 478 B 0 B
build/block-library/blocks/table/style-rtl.css 390 B 0 B
build/block-library/blocks/table/style.css 390 B 0 B
build/block-library/blocks/tag-cloud/editor-rtl.css 118 B 0 B
build/block-library/blocks/tag-cloud/editor.css 118 B 0 B
build/block-library/blocks/tag-cloud/style-rtl.css 94 B 0 B
build/block-library/blocks/tag-cloud/style.css 94 B 0 B
build/block-library/blocks/template-part/editor-rtl.css 557 B 0 B
build/block-library/blocks/template-part/editor.css 556 B 0 B
build/block-library/blocks/text-columns/editor-rtl.css 95 B 0 B
build/block-library/blocks/text-columns/editor.css 95 B 0 B
build/block-library/blocks/text-columns/style-rtl.css 166 B 0 B
build/block-library/blocks/text-columns/style.css 166 B 0 B
build/block-library/blocks/verse/editor-rtl.css 62 B 0 B
build/block-library/blocks/verse/editor.css 62 B 0 B
build/block-library/blocks/verse/style-rtl.css 87 B 0 B
build/block-library/blocks/verse/style.css 87 B 0 B
build/block-library/blocks/video/editor-rtl.css 504 B 0 B
build/block-library/blocks/video/editor.css 503 B 0 B
build/block-library/blocks/video/style-rtl.css 193 B 0 B
build/block-library/blocks/video/style.css 193 B 0 B
build/block-library/common-rtl.css 1.08 kB 0 B
build/block-library/common.css 1.08 kB 0 B
build/block-library/editor-rtl.css 9.54 kB 0 B
build/block-library/editor.css 9.53 kB 0 B
build/block-library/style-rtl.css 8.85 kB 0 B
build/block-library/style.css 8.85 kB 0 B
build/block-library/theme-rtl.css 736 B 0 B
build/block-library/theme.css 736 B 0 B
build/block-serialization-default-parser/index.js 1.87 kB 0 B
build/block-serialization-spec-parser/index.js 3.06 kB 0 B
build/components/style-rtl.css 15.5 kB 0 B
build/components/style.css 15.5 kB 0 B
build/customize-widgets/style-rtl.css 168 B 0 B
build/customize-widgets/style.css 168 B 0 B
build/data-controls/index.js 830 B 0 B
build/deprecated/index.js 769 B 0 B
build/dom-ready/index.js 576 B 0 B
build/edit-navigation/index.js 11 kB 0 B
build/edit-navigation/style-rtl.css 1.26 kB 0 B
build/edit-navigation/style.css 1.25 kB 0 B
build/edit-post/style-rtl.css 6.81 kB 0 B
build/edit-post/style.css 6.8 kB 0 B
build/edit-site/style-rtl.css 4.47 kB 0 B
build/edit-site/style.css 4.46 kB 0 B
build/edit-widgets/style-rtl.css 3.2 kB 0 B
build/edit-widgets/style.css 3.2 kB 0 B
build/editor/editor-styles-rtl.css 543 B 0 B
build/editor/editor-styles.css 545 B 0 B
build/editor/style-rtl.css 3.9 kB 0 B
build/editor/style.css 3.9 kB 0 B
build/element/index.js 4.62 kB 0 B
build/escape-html/index.js 735 B 0 B
build/format-library/style-rtl.css 637 B 0 B
build/format-library/style.css 639 B 0 B
build/hooks/index.js 2.28 kB 0 B
build/html-entities/index.js 622 B 0 B
build/i18n/index.js 4.01 kB 0 B
build/keycodes/index.js 1.96 kB 0 B
build/list-reusable-blocks/index.js 3.14 kB 0 B
build/list-reusable-blocks/style-rtl.css 629 B 0 B
build/list-reusable-blocks/style.css 628 B 0 B
build/notices/index.js 1.86 kB 0 B
build/nux/index.js 3.42 kB 0 B
build/nux/style-rtl.css 731 B 0 B
build/nux/style.css 727 B 0 B
build/plugins/index.js 2.61 kB 0 B
build/react-i18n/index.js 1.45 kB 0 B
build/redux-routine/index.js 2.84 kB 0 B
build/reusable-blocks/style-rtl.css 225 B 0 B
build/reusable-blocks/style.css 225 B 0 B
build/server-side-render/index.js 2.82 kB 0 B
build/shortcode/index.js 1.7 kB 0 B
build/token-list/index.js 1.27 kB 0 B
build/warning/index.js 1.14 kB 0 B
build/wordcount/index.js 1.22 kB 0 B

compressed-size-action

@mtias mtias added the Needs Design Feedback Needs general design feedback. label Oct 1, 2020
@MichaelArestad
Copy link
Contributor

MichaelArestad commented Oct 27, 2020

I'm not showing a block preview, because that component relies on the block already being installed :(

Is this something that we could change if we had a preview system built for the block directory (that perhaps uses generated images)?

I dropped the description onto all views since the hovercard isn't available - we can switch that to mobile-only once the hovercard is figured out

Nice.

The spinner makes the block author names wrap, but leaving that space for an eventual spinner made the blocks look awkwardly aligned

Good point. I think the added space is okay for now. Alternatively, we could position it absolutely over the content on top of a white gradient like this:

image

What do you think?

We still need a place for the error notices

I think we should implement error states using the top notice pattern as @melchoyce proposed here. They look like this:

image

The biggest benefit is the error will be visible even if the user closes the inserter or if the inserter changes state.

Notes

  • I made some minor CSS tweaks.
  • Because you didn't mention the block icons yet (instead of plugin icons), I'm assuming those haven't been implemented on the first pass. Are those still the plan?
  • Can the list item descriptions be shorter? Something like three lines? I can do this with CSS if it's easier.

Bugs

There are two that I noticed. The first is hard to spot, but sometimes there's a flash of content in the sidebar when the spinner is active during a search.

I also see a 0 results bug:

image

I would expect to see something like "No blocks found matching asdfasdfasdf"

@ryelle
Copy link
Contributor Author

ryelle commented Jan 13, 2021

This is updated and ready for a proper review & design feedback — I've updated the description with the current status and screenshots.

@StevenDufresne
Copy link
Contributor

Awesome work on this @ryelle! It's looking really good. The code looks good.

I really like the new UX.

A couple of notes:

I wonder if the “by” line should be on a new line. It works well first short plugin titles and 1 author. Having multiple names in the author string makes the plugin title hard to see.

Item Loader: I know this implementation follows the designs but the right side icon is a bit unexpected seeing that there's no button there anymore. Just adding another option for discussion.

Current Option

@gziolo
Copy link
Member

gziolo commented Jan 19, 2021

It looks like a significant improvement for Block Directory in terms of discoverability 💯 Thank you for working on it.

@shaunandrews
Copy link
Contributor

image

I find the interstitial "Show X blocks" button a little strange. On one hand, I like that it clearly divides blocks you have from block you don't have yet. But, I also think its probably a little too easy to ignore.

We could default to showing any available blocks from the directory without the need to click a button:

image

That said, its probably "OK" for now, but may be worth revisiting in a new PR.

--

image

When you do click the button, you see this message. First, when there is only one result the phrase "These blocks" is a little strange. Second, it doesn't really explain what happens if you select a block. I think it could be more clear, maybe something like:

Select a block to install and add it to your post.

--

image

When I select an available block, currently a spinner is overlaid to indicate "something is happening." We could dim the image, place the spinner over-top, hide the rating and description, and replace the byline with an "Installing..." message:

image

Once installed, the message changes to "Installed!", the new block appears in the list of installed blocks above, and the block is added to the document. I think a Snackbar notice could be helpful here as well to help explain what just happened:

image

Its worth noting that with the current behavior of the inserter sidebar, after adding a block to the document, the inserter sidebar is closed and focus is moved to the newly added block. This behavior may change (See #28191), and would likely affect the experience of installing and adding a block — for example, if the sidebar remains open, then it might make sense to remove the "Installed!" notice and block from he list of available blocks.

--

If there is an error, we can display it in the block listing directly:

image

--

Here's a few GIFs of installing a block, to help put all of the above together:

Installing a Block

Block Install Error

@ryelle
Copy link
Contributor Author

ryelle commented Jan 22, 2021

@shaunandrews I've made the changes from your designs, you can see in the screen recording here- the first block installed has an error, which shows up as a dismissible notice and in the block card, then the second block installs successfully and shows the snackbar. I also removed the "show X blocks" step, the installable blocks list always shows up in searches now (that's not in the video).

Block.Dir.Install.mp4

@shaunandrews
Copy link
Contributor

shaunandrews commented Jan 22, 2021

Very cool. Thanks for the update. Here's a comparison of what I seen in your video alongside the Figma design:

image

Here's a few things that stood out to me:

  • If there are no blocks available it could be helpful to display a message stating explaining the lack of blocks. Also there's some extra space from the empty list of blocks that could be removed.
  • The "AVAILABLE TO INSTALL" heading and the text below it clash; The small, uppercase, light-gray followed by larger, darker text breaks the visual hierarchy, and just generally feels weird. In the design I avoided using the "Section Heading" styling, in favor of a more common subtitle style.
  • In the design, I reduced the padding around each item in the list. I used 12px, but we should use the related CSS variable.
  • I split up the block's name and the author to make it easier to scan the list, and help avoid splitting author names into multiple lines. I emphasized the title by making it bold, and reduced the number of colors with both the block's name and author set to the same color.
  • Having the rating stars breaking up the connection between block name, author, and description makes it hard to read and scan. It also puts more emphasis on the stars than (I think) they deserve. I reduced the size of the stars, removed the review count (this could be in a tooltip), and placed them under the image. These changes go a long way towards improving the general readability of the results.
  • When installing, can we hide the rating stars?
  • I wonder about the need for having an error in-line in the sidebar and the banner across the top of the editor. I guess you might close the sidebar and not see the in-line notice? Seeing it in action, I'm not sure we should have both. Is reloading the page really the only way to fix things? Could we have a "Retry" button instead?
  • When the block is added and the sidebar is closed, its a little jarring at first. In the design I added a Snackbar that says "XYZ block installed and added." to hopefully smooth over that sudden disappearance of the sidebar.

@ryelle ryelle force-pushed the update/block-directory-ui branch 2 times, most recently from d106ba7 to 57a247c Compare January 25, 2021 23:36
@ryelle
Copy link
Contributor Author

ryelle commented Jan 25, 2021

Thanks for all the feedback, I didn't pick up on some of those changes from the screenshots 🙂 I think I've got all of it, except for the two things that we can't really do since the whole item is a button (more details below).

I've added a message when no local blocks are found, updated the "Available to install" style (I saw it like this in your first screenshot, didn't notice it was different in the others), fixed the spacing and tweaked the title & author. The rating stars have been moved & condensed a bit, and disappear while installing.

Search
Screen Shot 2021-01-25 at 5 51 11 PM

Installing
Screen Shot 2021-01-25 at 5 51 19 PM

Error
Screen Shot 2021-01-25 at 6 06 37 PM

No locally installed blocks
Screen Shot 2021-01-25 at 6 29 21 PM

removed the review count (this could be in a tooltip)

I had to just remove it - the whole item is a button, so we can't have interactive elements like a tooltip inside. I think the number of ratings is still important, but I don't have a great idea on how to show them.

Is reloading the page really the only way to fix things? Could we have a "Retry" button instead?

In the case of a fatal error, yeah reloading is the only way to fix it. If it's a recoverable error, we can offer a retry. We did show a reload or retry button - that accidentally got dropped in the redesign. Unfortunately though, same issue as above - we can't have a button in a button.

In the design I added a Snackbar

It's there, it shows up at the end of the video - "Block [whatever] installed and added." It's a little delayed in the video since my local site/Chrome is slow, but it does show up right after the sidebar is closed.

Screen Shot 2021-01-25 at 5 51 44 PM

@ryelle
Copy link
Contributor Author

ryelle commented Feb 4, 2021

@shaunandrews What are your thoughts on the issues above (that we can't have interactive elements inside the block-plugin card)?

@shaunandrews
Copy link
Contributor

I had to just remove it - the whole item is a button, so we can't have interactive elements like a tooltip inside. I think the number of ratings is still important, but I don't have a great idea on how to show them.

Perhaps we put a tooltip on the button? Something like "Install {{blockName}} - 5 stars with 392 review".

If it's a recoverable error, we can offer a retry.

Could we just have the whole button be the retry button? Maybe update the message to something like "Press to try again" or something?

@ryelle
Copy link
Contributor Author

ryelle commented Feb 26, 2021

The whole-button tooltip works well:
Screen Shot 2021-02-26 at 2 35 42 PM

If there are no reviews I've just left off the review text:
Screen Shot 2021-02-26 at 2 38 24 PM

The button already works as a retry button, so that works out. The tooltip updates in this case, too:
Screen Shot 2021-02-26 at 2 38 00 PM

Copy link
Contributor

@shaunandrews shaunandrews left a comment

Choose a reason for hiding this comment

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

Looking good to me!

Base automatically changed from master to trunk March 1, 2021 15:44
@ryelle ryelle force-pushed the update/block-directory-ui branch from 9056f22 to 5a8addd Compare March 2, 2021 16:07
@ryelle ryelle merged commit 44c6dc8 into trunk Mar 2, 2021
@ryelle ryelle deleted the update/block-directory-ui branch March 2, 2021 17:07
@github-actions github-actions bot added this to the Gutenberg 10.2 milestone Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Directory Related to the Block Directory, a repository of block plugins Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for a user-triggered search in Block Directory Iterate the Block directory search results
6 participants