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

Quick Inserter: push to "explore" option when searching for patterns #42343

Open
annezazu opened this issue Jul 11, 2022 · 6 comments
Open

Quick Inserter: push to "explore" option when searching for patterns #42343

annezazu opened this issue Jul 11, 2022 · 6 comments
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Enhancement A suggestion for improvement.

Comments

@annezazu
Copy link
Contributor

What problem does this address?

In the FSE Outreach Program's usability testing, one participant tried searching for "patterns" in the quick inserter but nothing appeared:

Screen Shot 2022-07-11 at 2 06 42 PM

This feels like an oversight, especially with recent work done to prioritize patterns in #38709

What is your proposed solution?

Since we don't know what patterns someone might want to use, I think it makes sense to push someone to the "explore" section from here or to open the Pattern tab of the Inserter. Here's a very rough and loose idea:

Screen Shot 2022-07-11 at 2 11 06 PM

Need input from @WordPress/gutenberg-design either way as the above is just a quick idea.

cc @jorgefilipecosta since you've worked on this feature!

@annezazu annezazu added [Type] Enhancement A suggestion for improvement. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Jul 11, 2022
@annezazu
Copy link
Contributor Author

This came up with an additional participants for usability testing: "Having to go to the + sign and then browse all and that’s the only way I know how to get to patterns is super cumbersome”

@jameskoster
Copy link
Contributor

Since we don't know what patterns someone might want to use

We can potentially use context to make a decent guess? E.g.

  • In a header template part – show header patterns
  • At the root of the 404 template – show 404 patterns
  • At the root of a singular template – show post content patterns
  • At the root of an archive template – show loop patterns
  • At the root of an empty page – show full page patterns
  • At the root of a non-empty page – show general content patterns

And so on.

@jorgefilipecosta
Copy link
Member

The problem comes from patterns having names and are not named "pattern" so when we search by name description etc "pattern" is not found. When we search for block some blocks appear just because they have "block" in their description.

I'm not sure the best solution here. Should we hardcode a special case for "pattern" search? In that case we should also hardcode for substrings like "patter"? If yes it feels a little bit strange to show that special case for a string like "pat".

We can potentially use context to make a decent guess? E.g.

These decent guesses should probably be the default when the inserter opens. In that case, can we just show everything as if the search was empty if the user searches for "pattern" and no results exist?

@jameskoster
Copy link
Contributor

jameskoster commented Jul 14, 2022

These decent guesses should probably be the default when the inserter opens.

That potentially seems a bit heavy-handed. A user might not want patterns depending on the task at hand. Anecdotally I find it kind of annoying how the root-level quick inserter sometimes doesn't show me blocks despite searching for it explicitly.

If there was a way to make the guesses appear when someone searches explicitly for 'pattern' that could be good, but it might be simpler to just redirect them to the pattern explorer. Kind of like Anne's suggestion :)

Screenshot 2022-07-14 at 16 44 14

@paaljoachim
Copy link
Contributor

Instead of the "No results found." (which is not helpful) adding some kind of general guide to help the user along the next step can help.

This would mean any time the "No results found." shows up we can have a specific guide show up.
Like a general placeholder that can mention blocks, patterns etc.

I am thinking something along the lines of this:
No results

@gleysen
Copy link

gleysen commented Jan 9, 2023

Perhaps something similar with using "/" to get a list of blocks, we could extend this feature to typing "//" to get a list of patterns?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants