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

For long hovers, errors appear all the way at the bottom and require scrolling #73120

Closed
DanTup opened this issue May 1, 2019 · 24 comments · Fixed by #166560
Closed

For long hovers, errors appear all the way at the bottom and require scrolling #73120

DanTup opened this issue May 1, 2019 · 24 comments · Fixed by #166560
Assignees
Labels
editor-hover Editor mouse hover feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@DanTup
Copy link
Contributor

DanTup commented May 1, 2019

I'm not sure if this is new, but I'm seeing it a lot lately. When I hover over some code with a red squiggle, if the hover/tooltip has a long description, I have to scroll all the way to the bottom to find the error.

Screenshot 2019-05-01 at 9 41 21 am

Screenshot 2019-05-01 at 9 41 30 am

I think it would be better if errors/warnings were either at the top, or somehow docked at the bottom of the tooltip, so you don't have to scroll to get to them. Some tooltips a REALLY long and it's a pain. I'm aware of the F8 functionality, I just prefer the tooltips :-)

@vscodebot vscodebot bot added the editor-contrib Editor collection of extras label May 1, 2019
@RMacfarlane RMacfarlane added editor-hover Editor mouse hover and removed editor-contrib Editor collection of extras labels May 1, 2019
@sandy081 sandy081 added the feature-request Request for new features or functionality label May 2, 2019
@sandy081 sandy081 added this to the Backlog milestone May 2, 2019
@sandy081
Copy link
Member

sandy081 commented May 2, 2019

I would prefer the errors/warnings are closer to the cursor i.e at the bottom. It means those views on top of it should not take the complete height.

@DanTup
Copy link
Contributor Author

DanTup commented May 2, 2019

I would prefer the errors/warnings are closer to the cursor i.e at the bottom

I think this may depend which way the hover appears? When your cursor is near the top, the box will appear below it, so having them at the bottom is still potentially quite far.

In any case, you shouldn't need to scroll through all of the hover content to see them :(

@rlivings39
Copy link

I hit this same issue while implementing a language server. My hover text provider was showing help text for functions that could be large. I saw that the diagnostic wasn't presented and concluded (incorrectly) that hovers and diagnostics were not compatible and disabled hover.

Somehow having the diagnostics be sticky would be my preference. The scrolling would then be per hover section rather than the entire hover panel.

@DanTup
Copy link
Contributor Author

DanTup commented Nov 25, 2019

This was reported by another user:

Dart-Code/Dart-Code#2126

@sandy081 is there a plan to improve this? I understand you want them closer to the cursor, but having to scroll through pages of documentation to figure out what the red squiggle is feels like a really bad UX. Maybe errors could be outside of the scrollable docs (similar to the "Quick fix" section in the screenshots above?)

@vogella
Copy link

vogella commented Nov 25, 2019

Pleas fix this, this is really bad UX.

@sandy081
Copy link
Member

Sorry have not planned yet.

@fbricon
Copy link
Contributor

fbricon commented Nov 26, 2019

Large hover payloads are the norm in Java-land. This is definitely an issue for Java users.
cc @akaroml

@akaroml
Copy link
Member

akaroml commented Dec 3, 2019

Large hover payloads are the norm in Java-land. This is definitely an issue for Java users.
cc @akaroml

That's why we put the entry "Resolve unknown type" as part of the Javadoc so it shows on top:
image

@sandy081 We would love to revisit this when the change is in.

@lf-
Copy link
Contributor

lf- commented Mar 26, 2021

This is particularly frustrating in Rust because the Rust compiler often emits diagnostics that cover entire lines, for example, borrow check errors, which overlap a lot of functions, causing the display of both docs and errors on hover, and surfacing this usability issue.

@ppershing
Copy link

Would it be maybe possible to let plugins control the ordering? That way, it would be possible to use error "close to the line" for some languages that typically don't have long documentation (e.g. TypeScript, JS, ...) whereas for languages that do have long documentation (Java, Rust, ...) the plugins would be able to show error at the top.

@lnicola
Copy link
Contributor

lnicola commented Apr 5, 2021

I don't see why you'd want to have the error at the bottom, since it's presumably the most important thing about that line.

@bsutton
Copy link

bsutton commented Jan 10, 2022

Can we get action on in this.

It's a constant annoyance they affects every user.

@JRDetwiler
Copy link

Is there a priority setting anywhere or is this still an open issue altogether?

@tekert
Copy link

tekert commented Aug 25, 2022

I'm amazed this doesn't have the priority it deserves after 3 years, problems are always higher priority on coding. A tooltip should reflect that and also provide ordering of fields.

@mvtec-bergdolll
Copy link

@sandy081 this is the current UX:

rust-analyzer-error-show

That's :/

@dunika
Copy link

dunika commented Sep 23, 2022

I really don't want to be the guy commenting +1, but in this instance it seem warranted.

It would save me a at least an hour over the course of a year if this was configurable.

@thethongngu
Copy link

My current workaround is using Error Lens to show error directly on the editor instead of hovering (and scrolling!). A bit messy but acceptable to me.

@viciousstar
Copy link

please fix it.

@ShayBox
Copy link

ShayBox commented Oct 11, 2022

It's even worse: When you scroll down quickly to the bottom, when you reach the bottom it will start scrolling the code editor itself which causes the popup to disappear, so I have to scroll slowly and carefully.

@WynterDing
Copy link

WynterDing commented Nov 8, 2022

It's apparently diagnostic message is more important than other hover message, put diagnostic message on the top should be the basic feature for editor. 😓

@tuliolima
Copy link

It would be a great improvement. Always I open the hover with a key shortcut and move the mouse to scroll down it disappears and I need to open again. It bothers a lot.

@azdavis
Copy link
Contributor

azdavis commented Dec 7, 2022

I opened this pr which should fix the issue, but it hasn't gotten any attention for the past 3 weeks :/ #166560

@starball5
Copy link

Related question on Stack Overflow: How to show error/warning above the documentation in mouse hover popup?

@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Feb 27, 2023
@alexdima alexdima modified the milestones: Backlog, March 2023 Feb 27, 2023
@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Mar 2, 2023
@aiday-mar aiday-mar added the verification-needed Verification of issue is requested label Mar 20, 2023
@aiday-mar
Copy link
Contributor

aiday-mar commented Mar 20, 2023

Steps to test:

  1. Open a file and type some code with an error, for example a variable which is incorrectly initialized.
  2. Hover over this code and verify that the error messages appears first in the hover.

@eleanorjboyd eleanorjboyd added the verified Verification succeeded label Mar 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-hover Editor mouse hover feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.