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

editor - update style and behaviour of message widget #186480

Merged
merged 1 commit into from
Jun 28, 2023
Merged

Conversation

bpasero
Copy link
Member

@bpasero bpasero commented Jun 28, 2023

fix #186256
fix #186257

@bpasero bpasero enabled auto-merge (squash) June 28, 2023 09:28
@bpasero bpasero self-assigned this Jun 28, 2023
@bpasero bpasero added this to the June 2023 milestone Jun 28, 2023
this.closeMessage();
// close on blur (debounced to allow to tab into the message), cursor, model change, dispose
this._messageListeners.add(Event.debounce(this._editor.onDidBlurEditorText, (last, event) => event, 0)(() => {
if (this._mouseOverMessage) {
Copy link
Member

@jrieken jrieken Jun 28, 2023

Choose a reason for hiding this comment

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

I believe you could get away without this property and check. The editor can tell you if it has text or widget focus and because the message is content widget focusing it will mean the editor signals widget focus (hasWidgetFocus)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I think my intent is to preserve as much of the behaviour today, where the message widget should not remain visible too much, but the only exception is when focus goes into the message widget, specifically when there is a link and you tab into the message to execute it:

Recording 2023-06-28 at 14 51 37

Since the event order without debouncing will be that blur is emitted first, we would otherwise eagerly close the message widget, even though it is in the process of receiving focus.

@bpasero bpasero merged commit 93b9d0a into main Jun 28, 2023
@bpasero bpasero deleted the ben/global-trout branch June 28, 2023 11:05
@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2023
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.

Readonly hover seems to disappear slightly too fast Readonly hover link doesn't look like a link
2 participants