arxanas / scm-record

`scm-record` is a UI component to interactively select changes to include in a commit. It's meant to be embedded in source control tooling.
23 stars 9 forks source link

ux: wrapping to top/bottom when scrolling past bottom/top is confusing #49

Open schweikert opened 3 months ago

schweikert commented 3 months ago

Description of the bug

When I edit changes using scm-record, I often go past the last entry and I am temporarily confused by the fact that the UI brings me to the top entry, instead of stopping.

Steps:

Expected behavior

It should stay on the same line.

Actual behavior

It goes to the first line.

Version of rustc

No response

arxanas commented 3 months ago

Can you elaborate on the justification? Many kinds of menus do loop around, and many do not, so we ought to decide what kind of UI idioms apply in this case. I originally picked the UI idiom that I felt was most natural for CLI/TUIs.

schweikert commented 3 months ago

This is mostly a matter of personal preference, and in general I prefer when UIs don't behave like this. In the case of scm-record, I feel like the behavior is however worse than usual, because the UI elements are expandable and so I often can't tell visually / intuitively that I am on the last line. I just find myself often hitting the bottom arrow key once too much and being confused by the fact that I am on the top again afterward. If this was configurable, it would be great (but I still would recommend the default behavior to be not to wrap).

schweikert commented 2 months ago

(small additional note of something that I realized: one possible explanation why it is confusing for me, is that wrapping breaks a "spatial" mental model for what I see on the screen. In the physical world, usually when you come to the end of somewhere, you don't come back to the top of it if you try to go further)