question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[product icon themes] No fallback for using icon contribution point

See original GitHub issue

Testing #117263

While it’s been nice to leverage custom icons from another extension:

image

There doesn’t seem to be a way to set a fallback in case a user does not have the custom icon extension installed:

image

I guess you could mark that other extension as a dependency, but that would make it harder to use and would love for an easier way. We should allow for a fallback icon that uses a codicon icon.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aeschlicommented, May 17, 2021

Thanks, fixed the missing warning and validation of required properties,

1reaction
alefragnanicommented, May 15, 2021

Hi @aeschli ,

That’s great! It indeed does work, BUT with a few changes/limitations:

  • The id cannot have . (dots)
  • I must provide a description

If I use project-manager.favorites.codespaces as icon’s id, it will fail. It will display the error codicon instead. I tried a few scenarios and discovered that the . (dot character) was the reason. Yes, there is a regex to validate the icon’s id, but it does not warn about the dot character not being supported (if this is intentional).

Screen Shot 2021-05-15 at 13 46 44

Screen Shot 2021-05-15 at 13 35 50

Doing these changes, I could see it working perfectly:

"icons": [
            {
              "id": "project-manager-favorites-codespaces",
              "description": "Favorite Projects on Codespaces",
              "default": "github" 
             }
          ]

Screen Shot 2021-05-15 at 13 53 28

Screen Shot 2021-05-15 at 13 50 31

Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Product Icon Theme | Visual Studio Code Extension API
To define your own product icon theme, start by creating a VS Code extension and add the productIconThemes contribution point to the extension's...
Read more >
116695 – Default icon theme for Gnome based desktop ...
Currently, the default icon theme takes the fallback if the desktop environment is not KDE or Unity. Better we change this to Gnome...
Read more >
How do I write a VSCode extension to set a file icon for ...
You can follow issue 14662. VScode 1.64 (Jan. 2022) should include issue 140047: "finalize icon property of the language contribution point" ...
Read more >
Icon Theme Specification
It is recommended that the icons installed in the hicolor theme look neutral, since it is a fallback theme that will be used...
Read more >
Add a web app manifest
To use SVG icons safely, you should always specify a rasterized icon as a fallback for browsers that do not support SVG icons....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found