-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Comments
@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.
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 solutionI 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? 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. FeedbackI 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 - 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. |
I've briefly played with adding patterns to the 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 I'm not sure how this would be introduced to users, as I expect it would be incredibly hard to discover. |
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. |
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 :) |
Agreed. |
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. |
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. |
Then isn't this issue solved? What is left to do? |
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. |
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!
The text was updated successfully, but these errors were encountered: