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

Text Editor does not Center when I select a Method in Document Outline Window #76242

Closed
vsfeedback opened this issue Dec 3, 2024 · 5 comments · Fixed by #76326
Closed

Text Editor does not Center when I select a Method in Document Outline Window #76242

vsfeedback opened this issue Dec 3, 2024 · 5 comments · Fixed by #76326
Labels

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


Please see the Screenshot below.

image.png


Original Comments

Feedback Bot on 11/21/2024, 08:00 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Feedback Bot on 11/26/2024, 00:06 PM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 3, 2024
@sharwell
Copy link
Member

sharwell commented Dec 3, 2024

It's not clear whether the current behavior should be considered correct. Some features center the view on navigation, while many others use TryMoveCaretToAndEnsureVisible which does not center the view. The current behavior for Document Outline has been in place since at least #65641.

@Axium7
Copy link

Axium7 commented Dec 3, 2024

I am curious, why did this issue get moved here? https://developercommunity.visualstudio.com/t/Text-Editor-does-not-Center-when-I-selec/10796950

It centers when the method is not visible on the screen so why not make it center always? That would make it consistent and spare the user from having to look for it somewhere on the screen.

Ideally the entire Method name would be Highlighted as well without having to turn ON Highlight references to symbol under cursor in Settings.

@CyrusNajmabadi
Copy link
Member

why did this issue get moved here?

The code for this lives in this repo.

@CyrusNajmabadi
Copy link
Member

so why not make it center always?

General navigation philosophy is to not do that to maintain spatial consistent when possible.

People navigate a lot to something already on screen, while still wanting to see the code they are currently on. Always moving something to the center flights against that.

There's no right/wrong approach here. Just trade-offs and heuristics that can better things for some users while making it worse for others.

@Axium7
Copy link

Axium7 commented Dec 4, 2024

People navigate a lot to something already on screen, while still wanting to see the code they are currently on. Always moving something to the center flights against that.

Below is an image of my current IDE Setup. The Document Outline Window is always open for me and Pinned because it's crucial for navigation. 95%+ of the time, when I select something in the Document Window it's not on the screen, hence it gets centered on the screen. The Odd time that this does not happen my Flow gets interrupted and I have to figure out what happened... why is it not centered? where is the method? Is it above? Is it below? This breaks my train of thought / flow.

Image

It would also be nice if the entire method signature could be highlighted like this and the ability to modify the background color in settings. Document Window is the 3rd most important window for me in VS after Text Editor and Solution Explorer.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants