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

Patterns: use correct icon when searching with the slash inserter #51921

Closed
annezazu opened this issue Jun 26, 2023 · 9 comments · Fixed by #53208
Closed

Patterns: use correct icon when searching with the slash inserter #51921

annezazu opened this issue Jun 26, 2023 · 9 comments · Fixed by #53208
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

After creating a synced pattern and searching for it with the slash inserter, I noticed it defaults to the icon of the top block used in the pattern. This makes it hard to distinguish as different from other blocks:

Screen Shot 2023-06-26 at 8 45 43 AM

For example, if I change the order to have a paragraph block first, the paragraph icon is used:

Screen Shot 2023-06-26 at 8 47 43 AM

However, upon insertion, the icon switches appropriately in the toolbar:

Screen Shot 2023-06-26 at 8 46 13 AM
@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Jun 26, 2023
@annezazu annezazu changed the title Patterns: update icon when searching with the slash inserter Patterns: use correct icon when searching with the slash inserter Jun 26, 2023
@annezazu annezazu moved this to ❓ Triage in WordPress 6.3.x Editor Tasks Jun 26, 2023
@ndiego ndiego moved this from ❓ Triage to 📥 Todo in WordPress 6.3.x Editor Tasks Jun 27, 2023
@glendaviesnz
Copy link
Contributor

It looks like this is an existing issue with reusable blocks. It would be nice to fix, but I don't think it is a must-have as not introduced by the patterns changes.

@glendaviesnz
Copy link
Contributor

It looks like this was a deliberate design decision to show the topmost block icon https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/store/selectors.js#L1989 so currently a feature not a bug 😃

@annezazu
Copy link
Contributor Author

That feels strange to me 😅 @WordPress/gutenberg-design for some thoughts here. IMO we should be indicating they are patterns, along with sync state upon insertion.

@jameskoster
Copy link
Contributor

I agree this can feel a bit strange :).

We're using the symbol icon in the Library, and I think we should be consistent. It should be purple too.

@glendaviesnz glendaviesnz added [Type] Enhancement A suggestion for improvement. and removed [Type] Bug An existing feature does not function as intended labels Jun 28, 2023
@glendaviesnz
Copy link
Contributor

I think this should be pushed to post 6.3 - this is existing accepted behaviour so an enhancement rather than a bug. I agree that we should review it, but it is not critical and we have enough other things around patterns/resuable blocks to stabalise.

@jasmussen
Copy link
Contributor

When we only had reusable blocks, and patterns were nascent, there might have been good context. I tend to agree with Jay that the new unification here suggests purple and symbol icon for the synced patterns at least.

@ramonjd ramonjd moved this from 📥 Todo to 🐛 Punted to 6.3.1 in WordPress 6.3.x Editor Tasks Jul 14, 2023
@JosVelasco
Copy link

I agree patterns should be colored purple with the special icon, and I'd love to see unsynched patterns on that list when using the slash inserter. At least the custom patterns added by site users.

@glendaviesnz
Copy link
Contributor

glendaviesnz commented Jul 27, 2023

I'd love to see unsynched patterns on that list when using the slash inserter. At least the custom patterns added by site users.

@JosVelasco unsynced patterns were added to the / inserter here.

@glendaviesnz
Copy link
Contributor

PR here to make all the icons the same.

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
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants