Skip to content

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

Closed

Description

@annezazu

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

Activity

  1. added
    [Type] Bug
    [Feature] Patterns
    on Jun 26, 2023
  2. changed the title [-]Patterns: update icon when searching with the slash inserter[/-] [+]Patterns: use correct icon when searching with the slash inserter[/+] on Jun 26, 2023
  3. moved this from ❓ Triage to 📥 Todo in WordPress 6.3.x Editor Taskson Jun 27, 2023
  4. glendaviesnz commented on Jun 27, 2023

    @glendaviesnz
    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.

  5. glendaviesnz commented on Jun 27, 2023

    @glendaviesnz
    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 😃

  6. annezazu commented on Jun 27, 2023

    @annezazu
    ContributorAuthor

    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.

  7. jameskoster commented on Jun 27, 2023

    @jameskoster
    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.

  8. added
    [Type] Enhancement
    and removed
    [Type] Bug
    on Jun 28, 2023
  9. glendaviesnz commented on Jun 28, 2023

    @glendaviesnz
    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.

  10. jasmussen commented on Jun 28, 2023

    @jasmussen
    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.

  11. moved this from 📥 Todo to 🐛 Punted to 6.3.1 in WordPress 6.3.x Editor Taskson Jul 14, 2023
  12. JosVelasco commented on Jul 27, 2023

    @JosVelasco
    Contributor

    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.

  13. glendaviesnz commented on Jul 27, 2023

    @glendaviesnz
    Contributor

    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.

  14. glendaviesnz commented on Aug 1, 2023

    @glendaviesnz
    Contributor

    PR here to make all the icons the same.

  15. moved this from 🐛 Punted to 6.3.1 to ✅ Done in WordPress 6.3.x Editor Taskson Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Patterns[Type] Enhancement

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions