mum4k / termdash

Terminal based dashboard.
Apache License 2.0
2.71k stars 135 forks source link

Implement a scrollbar for widgets that support scrolling #164

Open mum4k opened 5 years ago

mum4k commented 5 years ago

For now that would be Text and Table.

The scrollbar should give a visual aid to the relative location of scrolling and allow clicking to scroll faster or skip larger portions of the data.

slok commented 5 years ago

I don't know if this could be related with this or not and better be in another issue, if is the second one I'll create a new issue to track this if you see valuable and possible (effort/value).

Would be nice to mark as scrollable (vertical) any element on the terminal, this is widgets or containers (example a row). I don't know how it would be designed and/or implemented, but I will try to explain:

In the end would be nice to get the same user experience as if you were on a web page, this is, mark a max height on the containers of the grid and if the widgets/containers inside this "scrollable" container are bigger (height) than that, the container would activate the scroll, setting a scroll visualization (could be optional) and giving the user the ability to scroll all the visual stuff inside this container (multiple containers and widgets).

With this, we could gain the ability to create terminal visualizations that aren't limited vertically by the terminal size.

mum4k commented 5 years ago

Thanks @slok, this a very good idea. I have filled #192 to track it. This will need some more thought as to how we design it, but I see it being very useful.

I will leave this issue to track the drawing of a scrollbar in Table and Text. However if we do our job right in #192, this might become obsolete.