Reveal closer to top instead of center: outline, go to definition, etc. #80726
Labels
editor-symbols
definitions, declarations, references
feature-request
Request for new features or functionality
Milestone
This is a UX improvement suggestion for "Go to definition" and when selecting an item from the outline. Note that JetBrains IDEs behave similar to this suggestion, so someone there thought about this issue, too.
If I asked you (i.e. a human) to scroll to a certain function or class, where would you position that function on the screen? You'd probably try to ensure that:
A simplification of those rules is: Scroll the definition close to the top, but not exactly to the top, so the comments (and some extra context in case of variable definitions) are still visible.
Currently, "Go to definition" and other operations center the function signature within the window.
It would be more ergonomic to position the result closer to the top of the window because then you can see longer class/function definitions without scrolling and most of the code after the definition is usually more important than most of the code before the definition. We just have to ensure that sufficient context from before the definition is visible.
So, my suggestion is to have it revealed at around 20% of the screen height. I've tested that value and had some good experience with it. 15% might also be fine. IMHO, we shouldn't go beyond 25%.
The text was updated successfully, but these errors were encountered: