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

Left Panel branches tree view with horizontal scroll defaults to scrolling to center instead of staying on the left #5907

Closed
anupshah opened this issue Dec 13, 2018 · 6 comments
Labels
Milestone

Comments

@anupshah
Copy link

anupshah commented Dec 13, 2018

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

If the left panel tree view lists branches with long names you get a horizontal scroll bar (good)

But it defaults to centering the content instead of starting on the left (not good)

If you manually scroll to the left and do operations that cause the left panel to update it scrolls to the center again

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Open left panel
Resize so it is narrow enough to get a scroll bar (or create branches with long names)
Do an operation like Fetch - when completed it will refresh the UI
The left panel is horizontally scrolled to the middle as per screenshot:

image

Note, when you open Git Extensions it defaults to this behaviour too which can be a bit annoying (mostly because the tree looks cut off). Easy workaround is to manually scroll left but that is not remembered, so next operation (e.g. Fetch, etc) resets it to be centred.

What is the expected behavior?
The left panel remains left aligned in terms of horizontal scrolling

Environment you encounter the issue:

  • Git Extensions 3.00.00.4433
  • Build fca7cf2
  • Git 2.17.1.windows.2
  • Microsoft Windows NT 10.0.17134.0
  • .NET Framework 4.7.3260.0
  • DPI 96dpi (no scaling)

Did this work in previous version of GitExtensions (which)?
N/A

As an aside, this 3.0 release is really awesome. Many thanks for it. I will donate shortly!

@drewnoakes
Copy link
Member

But it defaults to centering the content instead of starting on the left (not good)

I've seen this in tree views before. It scrolls the content right so that the selected node is aligned to the left of the viewport. It's not a great feature IMO.

@drewnoakes drewnoakes added area: user experience area: left-panel Issues related to the Left Panel labels Dec 13, 2018
@anupshah
Copy link
Author

I've seen this in tree views before. It scrolls the content right so that the selected node is aligned to the left of the viewport.

Interestingly I've not noticed it before elsewhere...

It's not a great feature IMO.

Yeah, certainly not nice; it also feels so minor in some ways but it is quite in your face, and given the attention 3.0 would get because of the awesome UI changes it feels more noticeable. Hope its easy to solve.

@drewnoakes
Copy link
Member

Agreed. I filed a very similar bug against a tree view in Visual Studio a few weeks ago.

BTW I confirmed this bug.

Before refresh:

image

Then refresh:

image

Interestingly, if you already have master selected in the tree (when master is checked out) then it doesn't scroll sideways.

This appears to happen in response to us setting the selected node in the treeview, probably in response to setting the selected revision in the grid (a guess).

@anupshah this would actually be a pretty introductory bug fix if you were keen!

@anupshah
Copy link
Author

@anupshah this would actually be a pretty introductory bug fix if you were keen!

Yes! Spare time is really lacking at the moment but I would like to try... barely done any WinForms stuff, but I'll see if I can do something next week and submit a pull request if so...

@drewnoakes
Copy link
Member

Hopefully it's less about winforms and more about eventing between components.

@RussKie
Copy link
Member

RussKie commented Dec 13, 2018 via email

freza-tm added a commit to freza-tm/gitextensions that referenced this issue Dec 15, 2018
freza-tm added a commit to freza-tm/gitextensions that referenced this issue Dec 15, 2018
@RussKie RussKie added this to the 3.0.1 milestone Dec 21, 2018
RussKie pushed a commit that referenced this issue Dec 21, 2018
fix for issue #5907

(cherry picked from commit 333df83)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants