Skip to content

Conversation

@imbant
Copy link
Contributor

@imbant imbant commented Jul 11, 2025

File icons were not displaying in the chat context Files & Folders picker while folder icons worked correctly. This was due to using iconClass instead of iconClasses property.

The quick-input component has two icon rendering paths:

  • iconClass: applies classes to icon container element
  • iconClasses: applies classes to IconLabel component

File icon themes require the specific CSS context provided by IconLabel, so file icons must use iconClasses to render properly.

Changes:

  • Add iconClasses property to IChatContextPickerPickItem interface
  • Change FilesAndFoldersPickerPick to use iconClasses instead of iconClass
  • File icons now render correctly using proper DOM structure

Fixes file icon display issue in chat context picker while maintaining backward compatibility with existing iconClass usage for simple codicons.

File icons were not displaying in the chat context Files & Folders picker
while folder icons worked correctly. This was due to using iconClass instead
of iconClasses property.

The quick-input component has two icon rendering paths:
- iconClass: applies classes to icon container element
- iconClasses: applies classes to IconLabel component

File icon themes require the specific CSS context provided by IconLabel,
so file icons must use iconClasses to render properly.

Changes:
- Add iconClasses property to IChatContextPickerPickItem interface
- Change FilesAndFoldersPickerPick to use iconClasses instead of iconClass
- File icons now render correctly using proper DOM structure

Fixes file icon display issue in chat context picker while maintaining
backward compatibility with existing iconClass usage for simple codicons.
@imbant
Copy link
Contributor Author

imbant commented Jul 11, 2025

Just need to build vscode on my pc to verify it

@imbant imbant marked this pull request as ready for review July 15, 2025 06:44
@imbant
Copy link
Contributor Author

imbant commented Jul 15, 2025

Before:

Image

After:

image

I think this is ready to review. This is my first PR to vscode so please let me know how to do better, thank you very much

@justschen
Copy link
Collaborator

thanks! lgtm.

justschen
justschen previously approved these changes Jul 21, 2025
@vs-code-engineering vs-code-engineering bot added this to the July 2025 milestone Jul 21, 2025
Tyriar
Tyriar previously approved these changes Jul 21, 2025
@osortega osortega modified the milestones: July 2025, August 2025 Aug 1, 2025
@justschen
Copy link
Collaborator

looks like we approved this but we never merged it. we'll get this merged for next iteration. thanks @imbant !

@joaomoreno
Copy link
Member

Ping @justschen

Copilot AI review requested due to automatic review settings October 15, 2025 13:24
@bpasero bpasero dismissed stale reviews from Tyriar and justschen via 2830000 October 15, 2025 13:24
Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was NOT ⚠️ actually working at all without further changes. It actually broke the picker quite severely for a icon theme such as "Material".

With the changes applied, things look good:

image

Thanks @imbant for the right pointers.

@vs-code-engineering
Copy link

vs-code-engineering bot commented Oct 15, 2025

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@TylerLeonhardt

Matched files:

  • src/vs/platform/quickinput/common/quickInput.ts

@bpasero bpasero enabled auto-merge (squash) October 15, 2025 13:53
@imbant
Copy link
Contributor Author

imbant commented Oct 15, 2025

This was NOT ⚠️ actually working at all without further changes. It actually broke the picker quite severely for a icon theme such as "Material".

With the changes applied, things look good:

image

Thanks @imbant for the right pointers.

Thanks for fixing it! Glad it helped. Would love to learn what additional changes were needed if you have time to share and what I can do for now as a newcomer!

@bpasero
Copy link
Member

bpasero commented Oct 15, 2025

Yeah the change in e45528a

@bpasero bpasero closed this Oct 15, 2025
auto-merge was automatically disabled October 15, 2025 15:15

Pull request was closed

@bpasero bpasero reopened this Oct 15, 2025
@bpasero bpasero merged commit 0c7c358 into microsoft:main Oct 15, 2025
32 checks passed
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants