yamcs / yamcs-studio

Desktop TM/TC Client for Yamcs
https://docs.yamcs.org/yamcs-studio/
Eclipse Public License 2.0
27 stars 14 forks source link

Auto-scroll for tables #90

Closed nmaas87 closed 4 years ago

nmaas87 commented 4 years ago

Please add the option to auto-scroll tables to the bottom if a new line is added, so that basically always the latest / newest line will be visible.

Current state: Table stays in normal position, if new lines are added you can scroll down manually, but on Live Displays, this won't do (especially if you're using to i.e. track events and their times).

Hint: Currently I use it by just inserting an new line to row 1 and always add new info to this row. The insert pushes the whole information down and by that, I still see the latest info, however in an alternate direction. To still allow for this usecase, it would be better to implement the Auto-scroll as a switchable feature so that it does not conflict with use-cases as this alternate one - where a auto-scroll is not wanted.

Link to discussion: https://groups.google.com/forum/#!topic/yamcs/ntemIoul_Xc

fqqb commented 4 years ago

After some experimentation, i've for now settled on a new method revealRow(rowIndex). Not exactly "auto", but I think it provides the desired capabilities, and fits pretty well in the existing table logic. The method will select and scroll a specific row into view (could be bottom, top, in the middle -- as you wish)

It's on the y5 branch. Don't expect to be able to build this just yet, I'm in the middle of updating to the new java client that will be part of Yamcs 5, and many functionalities are still broken.

Some example usage can be found here: https://github.com/yamcs/yamcs-studio/blob/3ebc294af72dba872b9b859bfb9c241cb08b432f/docs/authoring/misc/table.rst

If you would have further input before the next release (still some time away), you can let me know.

nmaas87 commented 4 years ago

Perfect! Thank you! I will open a new issue for some additional use-case (I just got one at the moment, but that would already help :))