tui-scrollview icon indicating copy to clipboard operation
tui-scrollview copied to clipboard

fix: content scrolling so it stops at bottom of viewable area instead…

Open s9tpepper opened this issue 1 year ago • 5 comments

… of at the top.

Before fix the content would scroll on the last page to the top of the viewable area, leaving a large blank space on the last page. This fixes the scrolling so the bottom of the last page stops at the bottom of the viewable area. Adjustment is made to the scrollbar thumb so it stops at the bottom of the scroll track.

s9tpepper avatar Apr 21 '24 07:04 s9tpepper

https://github.com/joshka/tui-scrollview/pull/30 changes the implementation a bunch, so I'm going to redo this and credit you for the fix.

joshka avatar Apr 25 '24 05:04 joshka

Ok sounds good! I was trying to add a test to try the simplification but I couldn’t figure out how to get the scroll thumb to size correctly, it kept drawing two cells tall instead of one.

s9tpepper avatar Apr 25 '24 05:04 s9tpepper

I merged the latest changes to my fork and I added a scroll_to_bottom test to verify the changes that I am proposing.

I also added a fixture that prints the row numbers to make it easier to verify that the scroll position is at the right location.

I simplified the logic around the y position that I updated and I cleaned up some messages that Clippy was complaining about.

Let me know what you think.

s9tpepper avatar Apr 27 '24 19:04 s9tpepper

Hey there, it might be some time before I respond to this, but I will get back to it as soon as I can.

joshka avatar May 06 '24 08:05 joshka

Any updates?

TerakomariGandesblood avatar Jul 18 '24 02:07 TerakomariGandesblood