Option to change the icon for components on the page hierarchy display

Created on 17 July 2024, 5 months ago

Overview

Give an option to change the icon for components on the page hierarchy display. Currently, the icons are hardcoded.

Proposed resolution

User interface changes

โœจ Feature request
Status

Active

Component

Page builder

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia gauravvvv Delhi, India

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @gauravvvv
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia gauravvvv Delhi, India
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia gauravvvv Delhi, India
  • Status changed to Postponed: needs info 5 months ago
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    Interesting, thanks for creating this issue!

    Are you proposing to define an icon per component category (see ๐Ÿ“Œ Define built-in components and categorization for components Postponed ), or per individual component?

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia gauravvvv Delhi, India

    I am proposing to define an icon per individual component as you can see in the screenshot we have different icons for each element.
    Example: The button has a different icon, so "the landing page" component.

  • Assigned to lauriii
  • Status changed to Active 5 months ago
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    Interesting!

    On the one hand, I really like that. On the other hand: I donโ€™t think itโ€™s feasible to require SDC developers to specify/create a unique icon for every SDC ๐Ÿ˜…

    Also: wouldnโ€™t that be an overwhelming sea of icons then?

    Either way: youโ€™re right that the designs are insufficiently precise on this front!

  • Issue was unassigned.
  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

    The components need to be able to specify icons to make the UI work. We're currently using this icon in several places from the layers view to the component list in the insert panel. We could start by allowing components to specify a custom icon but for DX + UX, we should provide an icon library which developers can use for selecting an icon. This ensures that the icons being used are consistent. I know that the UI Suite folks are implementing a new module for icon libraries which might be something we could use for this: https://www.drupal.org/project/ui_icons โ†’ .

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    ๐Ÿคฏ Wow, that's quite a DX change?! I don't think we ever discussed this, not even during the early days? Have you talked to SDC maintainer @e0ipso about this already? Is there a core issue for that already?

  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

    I agree we didn't discuss this during the discovery. AFAIK there isn't core issue for this yet. Is this something you think we should do directly in core or could we do this first on XB since the icons are specifically needed by XB?

    I don't think the DX impact is that large because this doesn't mean that SDCs are required to provide an icon. SDCs that are not exposed to the XB would not benefit from an icon and you'd also want to be able to use SDCs without an icon within the XB. We would provide a default icon for components without an icon.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia larowlan ๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ.au GMT+10

    FWIW I'm plus one for this

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    Note: SDCs already support a thumbnail.png file (ComponentMetadata::getThumbnailPath()), but here we're specifically talking about SVG icons.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    ๐Ÿ“Œ Define built-in components and categorization for components Postponed is in โ€” tangentially relates to this issue, see #4.

Production build 0.71.5 2024