vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Extension hover is often dismissed too early

Open rebornix opened this issue 1 year ago • 8 comments

Testing #223090

The hover widget of the extension is often dismissed too early and making it hard to move cursor to the hover widget and click on the links.

https://github.com/user-attachments/assets/89aff1b2-5c54-45c4-9ed9-3a1b4017a509

From the recording above you can see that I only get it working 1 out of 3 times.

rebornix avatar Jul 23 '24 18:07 rebornix

This is because you hover the scroll bar which dismisses it, currently you need to hold alt to lock the hover.

@sandy081 consider adding the showHoverHint option:

https://github.com/microsoft/vscode/blob/b4eb7c94495e25b5dc968a4d3a723346e27f48a3/src/vs/base/browser/ui/hover/hover.ts#L203-L209

We can also remove this hideOnHover requirement which I think will be needed to get this to work in your case:

https://github.com/microsoft/vscode/blob/b4eb7c94495e25b5dc968a4d3a723346e27f48a3/src/vs/editor/browser/services/hoverService/hoverWidget.ts#L225

Tyriar avatar Jul 24 '24 14:07 Tyriar

@Tyriar It seems this option showHoverHint is not available for setupManagedHover

https://github.com/microsoft/vscode/blob/dde43f978fc93d84249fe16f755076266e4937fc/src/vs/base/browser/ui/hover/hover.ts#L65

sandy081 avatar Jul 25 '24 06:07 sandy081

@sandy081 will merge https://github.com/microsoft/vscode/pull/223765 after we branch off

Tyriar avatar Jul 25 '24 17:07 Tyriar

https://github.com/user-attachments/assets/f4dde175-0b5d-4f84-af0e-7035cfe9813b

Another case for scm view. @Tyriar does your fix cover this too?

rebornix avatar Jul 25 '24 20:07 rebornix

@rebornix there you're hovering an element with a different hover which is why it's dismissed, related but different case and i think we're acting as designed there.

Tyriar avatar Jul 25 '24 20:07 Tyriar

@Tyriar in the recording I was attempting to move cursor into the hover so I can click on the button in the rich hover. It seems we don't have a large enough "hit area" in general and the hover is easily dismissed.

rebornix avatar Jul 29 '24 20:07 rebornix

Still seeing this. If there's a scrollbar like below I can't move the cursor to the hover without it getting dismissed:

Image

Holding alt works

mjbvz avatar Aug 27 '24 23:08 mjbvz

Fix here is to show the hint to Hold Alt and it seems not to be shown.

@Tyriar I have set the flag showHoverHint while showing the hover and it is still not shown.

https://github.com/microsoft/vscode/blob/d1388fd24fc0acf17ae1f759e85c1acf559ed759/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts#L545-L576

sandy081 avatar Aug 28 '24 12:08 sandy081

Seems to show unless the extension is verified:

Screenshot 2024-08-28 at 8 23 38 AM

Tyriar avatar Aug 28 '24 15:08 Tyriar