Skip to content

Conversation

@eidriahn
Copy link
Contributor

Fixes issue #284323

A simple fix that adds supportThemeIcons: true to the content of the setupDelayedHover function so that icons are correctly shown.

Copilot AI review requested due to automatic review settings December 28, 2025 15:50
@vs-code-engineering
Copy link

vs-code-engineering bot commented Dec 28, 2025

📬 CODENOTIFY

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

@bpasero

Matched files:

  • src/vs/base/browser/ui/toggle/toggle.ts

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an issue where theme icons were not rendered correctly when hovering over quick pick checkboxes. The fix involves changing the content property in the hover configuration from a plain string to an IMarkdownString object with supportThemeIcons: true.

Key changes:

  • Updated the setupDelayedHover call in the Toggle constructor to use an object-based content format that enables theme icon support

this.domNode = document.createElement('div');
this._register(getBaseLayerHoverDelegate().setupDelayedHover(this.domNode, () => ({
content: this._title,
content: { value: this._title, supportThemeIcons: true },
Copy link
Member

Choose a reason for hiding this comment

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

can you instead have the title options take in string | IMarkdownString | HTMLElement? since it's just used in the content property of the hover?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, this way the ones implementing the class are responsible for how the content is shown, much better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Tyriar I am not sure where the quick pick in your screenshot comes from, can't find it in vscode or vscode-copilot-chat. If that option is coming from one of those two repos let me know, if it's an option from an extension I guess they'll fix it.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I couldn't find that either. I am curious what @Tyriar thinks of this approach. How much massaging should we do in this hover? Should we strip/render the icons in the string case?

I was also thinking about the aria label as well... we for sure want to not have the icons in that... but right now it's inferred by the label.

Copy link
Member

Choose a reason for hiding this comment

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

Either way is good with me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Opted for stripping the icons.

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks for fixing this!

@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 30, 2025
@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) December 30, 2025 03:52
@TylerLeonhardt TylerLeonhardt merged commit e1ce3be into microsoft:main Dec 30, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants