-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Disable tooltips for Quick Input to prevent obscuring dropdown result (fix #285927) #286181
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
Disable tooltips for Quick Input to prevent obscuring dropdown result (fix #285927) #286181
Conversation
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
|
| input.ariaAutoComplete = 'list'; | ||
|
|
||
| // Hide tooltip when user starts typing to prevent obscuring dropdown results | ||
| this._register(dom.addDisposableListener(input, dom.EventType.KEY_DOWN, () => { |
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.
For clean code, this should be handled by the input that Quick Pick takes advantage of and be a configuration option on that object upon creation.
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.
Thanks for your review. I moved the logic to InputBox and added a boolean to the configuration called hideHoverOnKeyDown
| this.onfocus(this.input, () => this.onFocus()); | ||
|
|
||
| if (this.options.hideHoverOnKeyDown) { | ||
| this._register(dom.addDisposableListener(this.input, dom.EventType.KEY_DOWN, () => { |
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.
We already have an onValueChange function that runs when what is in the input changes. This feels like a good approximation without needing to add another event.
Additionally, rather than doing this, getBaseLayerHoverDelegate().hideHover(); we already have a this.hover.value which we could probably just dispose of instead.
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.
Yep you are totally right about using onValueChange. About getBaseLayerHoverDelegate().hideHover();, while testing, I tried setting this.hover = undefined (using this.hover.clear()) but it didn't really made the hover disappear from the UI
| readonly actionViewItemProvider?: IActionViewItemProvider; | ||
| readonly inputBoxStyles: IInputBoxStyles; | ||
| readonly history?: IHistory<string>; | ||
| readonly hideHoverOnKeyDown?: boolean; |
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.
last bit of feedback (I think). Let's change this to hideHoverOnValueChange since that is the actual event it is reacting to.
|
🤖 Copilot has tried out this change! Members of the team can view the recording here or download the Playwright trace here (run) |
|
🤖 Copilot has tried out this change! Members of the team can view the recording here or download the Playwright trace here (run) |
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.
Thanks! I think this is a good compromise
Disable tooltips for Quick Input to prevent obscuring dropdown result (fix #285927)