Provide autocomplete of slds icons to IconName

Issue #2160 resolved
Adam Stepanek created an issue

Hi Scott,

it would be nice to have autocomplete of slds icons for the IconName attribute on Invoicable actions.

Comments (9)

  1. Scott Wells repo owner

    Thanks for filing this as I added it to my own list just last week. I want to add completions not just for the IconName attribute but also for the various component attributes that allow you to specify an SLDS icon name so that it's comprehensive. I'll use this to track that work.

  2. Adam Stepanek reporter

    Good to hear :). Just a heads-up, the IconName will render only the custom icons. E.g. slds:custom:custom83, so not all icons should be listed in the autocomplete.

  3. Adam Stepanek reporter

    And also best would be to have a thumbnail of the icon, as documentation pop-up for example. But this probably won’t be possible.

  4. Scott Wells repo owner

    Adam, I'm a bit confused by "the IconName will render only the custom icons". My understanding is that you can specify any SLDS icon as slds:<category>:<iconName> or any SVG static resource as resource:[<namespace>__]<staticResourceName>:<svgID>. Is that not the case? Sorry, the documentation for all of this is quite lackluster and I want to make sure that I'm providing the correct code completions.

  5. Adam Stepanek reporter

    yes you are right, probably some miss use on my side. I’ve just tested it and you can use any of the slds icons

  6. Scott Wells repo owner

    Committed for inclusion in the next build:

    Issue_2160.png

    This iteration provides full support for SLDS icons but doesn't yet include support for local SVG static resources. Wherever SLDS icon names can be used in Apex, Aura, and LWC, code completion offerings show the qualified names as appropriate for that location with a scaled thumbnail of the icon itself. Once used, a scaled thumbnail is also displayed in the gutter for that line, and when clicked it will navigate to the actual SVG file for a read-only full view.

    Note that thumbails are darkened a bit when using a light IDE theme to provide sufficient contrast to see the image. Thumbnails are displayed with no color changes in dark IDE themes as they already have enough contrast.

    I'll look at adding support for local SVG static resources in a subsequent iteration.

  7. Log in to comment