-
Notifications
You must be signed in to change notification settings - Fork 37.4k
fix: fixes icons not showing when hovering quick pick checkboxes #285250
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
fix: fixes icons not showing when hovering quick pick checkboxes #285250
Conversation
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
|
There was a problem hiding this 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
setupDelayedHovercall in theToggleconstructor 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 }, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TylerLeonhardt
left a comment
There was a problem hiding this 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!

Fixes issue #284323
A simple fix that adds
supportThemeIcons: trueto the content of the setupDelayedHover function so that icons are correctly shown.