vektah / CodeGlance

Intelij IDEA plugin for displaying a code mini-map similar to the one found in Sublime
BSD 2-Clause "Simplified" License
1.06k stars 104 forks source link

Scrolls in wrong direction when changing direction in large files #201

Closed Bilge closed 6 years ago

Bilge commented 6 years ago

This is a subtle but important usability bug that exists when dragging the highlighted portion of the Codeglance preview pane. After dragging in either direction (up or down) and then changing to drag in the opposite direction, the scroll position briefly continues to move in the previous direction for the first few pixels, before realizing the user is dragging in the opposite direction and then changes its mind to follow the user's drag direction as normal again.

This is especially problematic when dragging to approximately the position you want, but then needing to back up just a small amount to finish the drag: Codeglance will actually make the fine adjustment in the wrong direction, which makes it very difficult to use.

⚠️ To reproduce this requires a large document. I am using a CSS file with just over 1200 lines. You can download a typical source file here.


The effect is even more pronounced when releasing the mouse to start a new drag, especially when the new drag begins at a different point on the highlighted spot. Steps to reproduce:

  1. Mouse down on highlighted area.
  2. Begin dragging in a direction, but stop before reaching either extent.
  3. Release mouse.
  4. Move mouse to different spot on highlighted area.
  5. Mouse down in now position on highlighted area.
  6. Drag in the opposite direction to before.

Now observe how the scroll position makes huge leaps in the wrong direction before moving in the direction the user is dragging.

vektah commented 6 years ago

Should be fixed in 1.5.4 by https://github.com/vektah/CodeGlance/pull/203

Bilge commented 6 years ago

@vektah This is not fixed in 1.5.4. The behaviour I described is still exactly the same in 1.5.4.

thscott commented 5 years ago

@vektah I think this should be reopened, as I'm still observing the issue as originally described (changing drag direction scrolling in the wrong direction for the first few pixels of the drag).