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

Allow for custom icons for non-file based editors (extensions, keybindings, search, settings) #199965

Closed
Tyriar opened this issue Dec 4, 2023 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded workbench-tabs VS Code editor tab issues

Comments

@Tyriar
Copy link
Member

Tyriar commented Dec 4, 2023

Nice easy polish change to switch to the 4 square icon here:

image

image

@Tyriar
Copy link
Member Author

Tyriar commented Dec 4, 2023

Makes sense for other editors: keybindings, search, settings

@Tyriar Tyriar assigned Tyriar and unassigned sandy081 Dec 4, 2023
@Tyriar Tyriar added this to the December 2023 milestone Dec 4, 2023
@Tyriar Tyriar added the feature-request Request for new features or functionality label Dec 4, 2023
@Tyriar
Copy link
Member Author

Tyriar commented Dec 4, 2023

I was hoping to do this myself and looked into it, but there's no clear way other than CSS with !important which is a hack to assign an icon for. I'm also a little worried I'll cause regressions with how this interacts with icon themes which I have minimal knowledge on, so assigning to respective owners.

For reference the terminal does it by generating CSS in JS and injecting it such that the codicon chars (which could theoretically change) are not hard coded in CSS:

const iconClasses = getUriClasses(instance, colorTheme.type);
if (uri instanceof URI && iconClasses && iconClasses.length > 1) {
css += (
`.monaco-workbench .terminal-tab.${iconClasses[0]}::before` +
`{background-image: ${dom.asCSSUrl(uri)};}`
);
}

@Tyriar Tyriar assigned bpasero, rzhao271, sandy081 and andreamah and unassigned Tyriar Dec 4, 2023
@Tyriar Tyriar removed this from the December 2023 milestone Dec 4, 2023
@bpasero bpasero added the workbench-editors Managing of editor widgets in workbench window label Dec 4, 2023
@bpasero bpasero changed the title Show extension icon for extension detail views Allow for custom icons for non-file based editors (extensions, keybindings, search, settings) Dec 4, 2023
@bpasero bpasero assigned benibenj and unassigned bpasero Dec 6, 2023
@bpasero bpasero added workbench-tabs VS Code editor tab issues and removed workbench-editors Managing of editor widgets in workbench window labels Dec 6, 2023
@bpasero
Copy link
Member

bpasero commented Dec 6, 2023

It seems that @mjbvz started the work on allowing Codicon in tab labels via #92122 to enable #90616. That PR had ongoing discussions and is still draft, but maybe some of the changes can be taken for consideration.

@benibenj benibenj added this to the December / January 2024 milestone Dec 8, 2023
@benibenj benibenj added the verification-needed Verification of issue is requested label Jan 23, 2024
@benibenj
Copy link
Contributor

Verification steps:

  1. open following editors: Settings editor, Keyboard shortcut editor, multi diff editor and an extension view (the view with the info about an extension) in the editor
  2. you should be seeing a different icon (non default) for each editor in the tab bar, open editors view and quick pick

@alexr00 alexr00 added the verified Verification succeeded label Jan 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2024
@aiday-mar aiday-mar added this to the December / January 2024 milestone Feb 6, 2024
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 verification-needed Verification of issue is requested verified Verification succeeded workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

8 participants