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

Inserter: Patterns tab state #61320

Open
scruffian opened this issue May 2, 2024 · 3 comments
Open

Inserter: Patterns tab state #61320

scruffian opened this issue May 2, 2024 · 3 comments
Assignees
Labels
Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@scruffian
Copy link
Contributor

What problem does this address?

Since #61108, there are several conditions under which the patterns tab doesn't display patterns:

  1. There is no block selected
  2. The theme removes support for core block patterns: remove_theme_support( 'core-block-patterns' );
  3. The patterns haven't loaded yet.

In each of these cases we show this message in the patterns tab:

Screenshot 2024-05-02 at 11 48 30

What is your proposed solution?

We should treat each of these situations differently:

  1. We should still show the patterns and just insert them at the end of the content
  2. We show a message to explain why
  3. We show a loading placeholder

It would be useful to have designs for these states. cc @jasmussen @richtabor

@scruffian scruffian added [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. labels May 2, 2024
@jasmussen
Copy link
Contributor

jasmussen commented May 2, 2024

This issue feels very reminiscent of #60991, enough that if we can do this:

We should still show the patterns and just insert them at the end of the content

It would likely solve both. We might refine this to "nearest insertable location" rather than "at the end". But wouldn't that mainly be the case? And if we can solve this, do we need loading placeholders or messages?

@jasmussen
Copy link
Contributor

CC: @jameskoster

@richtabor
Copy link
Member

We could combine these into one no results found view:

CleanShot 2024-05-02 at 09 16 33

CleanShot 2024-05-02 at 09 16 39

There's already a spinner used when pulling results from the block directory.; we could reuse that UX pattern:

CleanShot 2024-05-02 at 09 17 29

As aside, but the Inserter should probably not render a "no results found" and a spinner at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
Development

No branches or pull requests

3 participants