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

Comments

Gauravvvv created an issue. See original summary.

gauravvvv’s picture

Issue summary: View changes
StatusFileSize
new72.68 KB
wim leers’s picture

Status: Active » Postponed (maintainer needs more info)
Related issues: +#3459088: Every XB `Component` config entity should have a `category` property

Interesting, thanks for creating this issue!

Are you proposing to define an icon per component category (see #3459088: Every XB `Component` config entity should have a `category` property), or per individual component?

gauravvvv’s picture

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.

wim leers’s picture

Assigned: Unassigned » lauriii
Status: Postponed (maintainer needs more info) » Active
Issue tags: +Needs product manager review

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!

lauriii’s picture

Assigned: lauriii » Unassigned
Issue tags: -Needs product manager review

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.

wim leers’s picture

🤯 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?

lauriii’s picture

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.

larowlan’s picture

FWIW I'm plus one for this

wim leers’s picture

wim leers’s picture

Title: Option to change the icon for components on the page hierarchy display » Option to change the (SVG) icon for components on the page hierarchy display

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

wim leers’s picture

Version: » 0.x-dev

Project: Experience Builder » Drupal Canvas
Version: 0.x-dev » 1.x-dev

Experience Builder has been renamed to Drupal Canvas in preparation for its beta release. You can now track issues on the new project page.