Active
Project:
Drupal Canvas
Version:
1.x-dev
Component:
Page builder
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Jul 2024 at 13:05 UTC
Updated:
13 Dec 2024 at 17:13 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
gauravvvv commentedComment #3
gauravvvv commentedComment #4
wim leersInteresting, 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?
Comment #5
gauravvvv commentedI 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.
Comment #6
wim leersInteresting!
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!
Comment #7
lauriiiThe 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.
Comment #8
wim leers🤯 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?
Comment #9
lauriiiI 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.
Comment #10
larowlanFWIW I'm plus one for this
Comment #11
wim leers👍 Captured at #3462705-16: [META] Missing features in SDC needed for XB.
Comment #12
wim leersNote: SDCs already support a
thumbnail.pngfile (ComponentMetadata::getThumbnailPath()), but here we're specifically talking about SVG icons.Comment #13
wim leers#3459088: Every XB `Component` config entity should have a `category` property is in — tangentially relates to this issue, see #4.