Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[themes] Add product icon themes #92791

Closed
12 of 14 tasks
aeschli opened this issue Mar 16, 2020 · 23 comments · Fixed by #92268
Closed
12 of 14 tasks

[themes] Add product icon themes #92791

aeschli opened this issue Mar 16, 2020 · 23 comments · Fixed by #92268
Assignees
Labels
feature-request Request for new features or functionality icons-product Issues for in-product icons on-testplan themes Color theme issues
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Mar 16, 2020

Fixes #79130

  • productIconThemes definition files, with font specification and icon definitions (name -> font character)
  • JSON schema for product icon themes associated to -product-icon-theme.json
  • New contribution point productIconThemes
  • new setting workbench.productIconTheme
  • Test Product Icons example in vscode-colorize-tests
  • icon registry with all themable icons
  • allow to contribute to icon registry from icon contribution point --- Extracted as Allow to contribute to icon registry from icon contribution point #114942
  • update svg references to use codicons Cleanup remaining svg icons #86708
  • product icon theme selection command
  • name icons ids like we did it with color ids (id describes icon location glyphMargin.collapedRange, not the chosen representation (chevron-right). However we want to keep chevron-right as these can be accessed in Markdown or labels using `$(chevron-right)
  • update code references to unicode characters (git decorations, debug breakpoints, etc.)
  • allow codicons to be used in webviews
  • have helper wdget that makes it easy to host an image
  • finalize API Finalize product icon theme contributions #113828
@usernamehw
Copy link
Contributor

Do you have a build task to generate the product icon font .woff? At this moment I have no idea how to easily create a product icon font, even though there's already an example and documentation.

@aeschli
Copy link
Contributor Author

aeschli commented May 13, 2020

For the sample I used an online tool, https://icomoon.io/app/#/select, but a build task would be great. I created microsoft/vscode-extension-samples#303

@HaoboGu
Copy link
Contributor

HaoboGu commented Jun 8, 2020

@aeschli A quick question: can we customize icons in completion list?

image

@PKief
Copy link

PKief commented Jun 8, 2020

@HaoboGu yes, these icons are prefixed with symbol-, for example you can use the following configuration:

"symbol-string": {
  "fontCharacter": "\\EA46"
},
"symbol-module": {
  "fontCharacter": "\\EA47"
},
"symbol-namespace": {
  "fontCharacter": "\\EA47"
},
"symbol-package": {
  "fontCharacter": "\\EA47"
},
"symbol-object": {
  "fontCharacter": "\\EA47"
}

@miguelsolorio
Copy link
Contributor

miguelsolorio commented Jun 8, 2020

You can also reference our product icon documentation for the list of the icons and names. It's worth noting that we don't have full support for product icon theming yet, which is what this issue is tracking.

@HaoboGu
Copy link
Contributor

HaoboGu commented Jun 9, 2020

@PKief Thanks a lot!

@miguelsolorio miguelsolorio mentioned this issue Oct 19, 2020
@aeschli aeschli changed the title Add product icon themes [themes] Add product icon themes Nov 6, 2020
@peterpoliwoda
Copy link

+1 one for me, I'd love to be able to change a single icon, as in the above issue #110240

image

@felixhao28
Copy link

What if I want to add a new icon instead of overwriting an existing one, just to use it in my own extension?

@aeschli aeschli modified the milestones: Backlog, November 2020 Nov 19, 2020
aeschli added a commit that referenced this issue Nov 19, 2020
chenjigeng pushed a commit to chenjigeng/vscode that referenced this issue Nov 22, 2020
@aeschli aeschli mentioned this issue Nov 30, 2020
3 tasks
@usernamehw
Copy link
Contributor

Would it even be possible to manually merge multiple extension icons into 1 Frankenstein extension?

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2020

Yes, an extension can define any number of product icon themes. It's the same as with file icons. Check out the product icon sample: https://github.com/microsoft/vscode-extension-samples/tree/master/product-icon-theme-sample

@usernamehw
Copy link
Contributor

I was looking for tools to merge .woff files and forgot that there was a build task in extension sample that generates font from .svg. If extension authors were to use this extension sample then it should be easy to merge multiple product icons into 1.

@aeschli
Copy link
Contributor Author

aeschli commented Jan 19, 2021

I just pushed to insiders that product icon themes are now official API

@aeschli
Copy link
Contributor Author

aeschli commented Jan 25, 2021

Closing this issue. #114942 is for the icon contribution point

@Hezkore
Copy link

Hezkore commented Feb 26, 2021

I still don't quite get how I would use this to add an icon to certain file types or languages.
For example, if I want to add an icon to .bmx files, how would I use this?

@PKief
Copy link

PKief commented Feb 27, 2021

@Hezkore Product icon themes are not built to change the icons of files or languages. I think what you mean are the file icon themes.

@Hezkore
Copy link

Hezkore commented Feb 27, 2021

Yes, but that would replace ALL icons.
So for example, if I add support for .bmx then all .js files will have an empty icon.

Multiple issues and a few pull requests regarding this was closed and redirected to this fix.
For example this: #110830
So I was under the impression that this was added as well.

@aeschli
Copy link
Contributor Author

aeschli commented Mar 1, 2021

@Hezkore See #14662 (comment). Let's discuss it in that issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality icons-product Issues for in-product icons on-testplan themes Color theme issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

11 participants