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 pattern search to the slash inserter #26116

Closed
Tracked by #31153
bradhogan opened this issue Oct 14, 2020 · 11 comments
Closed
Tracked by #31153

Add pattern search to the slash inserter #26116

bradhogan opened this issue Oct 14, 2020 · 11 comments
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Comments

@bradhogan
Copy link

Is your feature request related to a problem? Please describe.
Right now, you can search patterns in the main inserter; however, you can only use the quick forward slash inserter to search for existing blocks.

Describe the solution you'd like
Would love to see the quick search (forward slash inserter) include the option to search the keywords for patterns (including custom patterns).

Thank you!

Screen Shot 2020-10-14 at 9 46 55 AM

@ZebulanStanphill ZebulanStanphill added [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Enhancement A suggestion for improvement. labels Oct 14, 2020
@youknowriad youknowriad added the Needs Design Needs design efforts. label Oct 15, 2020
@karmatosed karmatosed self-assigned this Nov 9, 2020
@karmatosed karmatosed removed their assignment Nov 25, 2020
@karmatosed
Copy link
Member

@bradley2083 thanks for creating this issue. It's certainly an interesting idea and I took sometime to explore. The problem to solve, if I am correct, is how to add block patterns as easily within the flow as blocks. This does make sense, but there is a fundamental differences between blocks and patterns that perhaps suggests a different avenue to explore.

  • Patterns don't have icons to denote them: this means the listing would be different to blocks.
  • Patterns are by their nature visual: it really helps to see, to browse these before applying them.

Whilst, the first point could lead to exploring what this interface looked like with them adapted. The second point for seems to lend to a need to think of any 'quick route to adding' to also expose them visually. They are different content and I think there's a strong argument for needing to see a pattern before adding, even when an advanced users of this '/' command.

Proposed solution

I started thinking of a way to bring maybe you quicker to the visual interace of patterns. What about adding a shortcut and once clicked the patterns section of the library would open?

Frame 5

As '/' is considered an advanced function, there could be similar thinking here that advanced users would know and learn the keyboard shortcuts as they create content.

This solution does break the flow of creating, you move away from the area you are working. The future holds exploring different options with block patterns, for example maybe even a modal that displays them. (#26905) This could then become what opens on this shortcut. That would avoid taking from the flow of creating.

Feedback

I realise that my solution is proposing something different, but due to the nature of patterns I think it's worth considering if it makes sense or not to add them to the '/' command. I'd love to open that discussion and hopefully my suggeston begins exploring being able to more rapidly get to patterns. I absolutely agree quickly accessing them is a great step, it's just how that could happen.

@karmatosed karmatosed added Needs Design Feedback Needs general design feedback. and removed Needs Design Needs design efforts. labels Nov 25, 2020
@ghost
Copy link

ghost commented Mar 3, 2021

@karmatosed - I understand the desire to preview a pattern before inserting it. However, reusable blocks are discoverable through the / key inline option and they can be just as complex as patterns. We set up our reusable blocks with a common prefix to differentiate them between standard blocks. It works really well for us. We're looking forward to patterns being easier to manage so we can use them to replace reusable blocks in most cases.
2021-03-02 16_56_45-Add New Page ‹ City of Bellingham — WordPress and 13 more pages - Work - Microso

@priethor priethor mentioned this issue Apr 23, 2021
22 tasks
@shaunandrews
Copy link
Contributor

I've briefly played with adding patterns to the / inserter:

image

Considering that pattern names often include block names, I think it might be difficult to navigate with a keyboard.

--

Alternatively, I think it might interesting to try a new ; inserter for specifically adding patterns:

image

I'm not sure how this would be introduced to users, as I expect it would be incredibly hard to discover.

@ghost
Copy link

ghost commented May 7, 2021

We don't think a preview needs to be provided for patterns with the "/" inline inserter option. If you want a preview, you can use the "Add Block" or "Toggle Block Inserter" option. The "/" is meant to be a quick shortcut from our experience.

@annezazu
Copy link
Contributor

This came up on a hallway hangout today with the FSE Outreach Program, especially as patterns are being prioritized in the quick inserter now. Consider this a renewed +1 :)

@richtabor
Copy link
Member

as I expect it would be incredibly hard to discover.

Agreed.

@mtias
Copy link
Member

mtias commented May 1, 2023

The best way to introduce this is likely going to be the wp:pattern block, I don't think individual patterns should intermix with the slash inserter results otherwise.

@carolinan
Copy link
Contributor

Are we expecting the / command to list both user-created and other patterns?

@richtabor
Copy link
Member

Are we expecting the / command to list both user-created and other patterns?

No. The inserter doesn't provide a well enough interface for deciding accurately what to choose. User-created patterns are fine, as they're something you've named yourself, but otherwise it'll be tough to distill whats what.

@carolinan
Copy link
Contributor

Then isn't this issue solved? What is left to do?

@annezazu
Copy link
Contributor

Good point. Let's close this out in favor of #51921. Right now, with synced patterns being introduced, this can be a more productive way forward to connect this feedback with the current interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

9 participants