microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.28k stars 28.57k forks source link

Hover flickers when clicking on the HEAD commit button. #223362

Closed bhavyaus closed 1 week ago

bhavyaus commented 1 month ago

Testing #223106

Create a few commits and open the SCM View to observe Incoming/Outgoing changes Move mouse over to the HEAD commit button but do not click Observe hover flickering.

 https://github.com/user-attachments/assets/4d136f53-3558-43cd-bbc3-d22d90544b62

lszomoru commented 1 month ago

@Tyriar, @benibenj any suggestion here other than playing with the hover widget delay? Thanks!

Tyriar commented 1 month ago

Are you passing in the same object to show the hover, and if not are you using IHoverOptions.id such that the hover service knows that it's the same thing?

lszomoru commented 1 month ago

In this particular case there is a hover for the whole list item (shows the commit details) and another hover for the "label" (shows the branch name). There are not tweaks to the hover timer. I guess when hovering over the "label" should the hover service stop the timer for the list item hover?

The same "flickering" is also present in the Extensions viewlet when you hover on a list row, and then on the gear action.

Tyriar commented 1 month ago

Ah I see, I don't think we ever supported hovers for elements inside elements well. Could you link to where you create the hover in each of these cases?

lszomoru commented 1 month ago

Both hovers are created in the list item renderer:

  1. list item hover - https://github.com/microsoft/vscode/blob/447e8dcee6ae611c6db443b2624d43e9a8d57aad/src/vs/workbench/contrib/scm/browser/scmViewPane.ts#L1099-L1100
  2. label hover - https://github.com/microsoft/vscode/blob/447e8dcee6ae611c6db443b2624d43e9a8d57aad/src/vs/workbench/contrib/scm/browser/scmViewPane.ts#L1118-L1119
lszomoru commented 1 week ago

Closing this issue as the hover on the label has been removed.