Dataframe view: add an `Index` column for instances and support un/collapsing
- Un/collapsing by clicking on the +
- Collapsing by clicking on the vertical line
@gavrelina I like the look of the [+] / [–] thing, but shouldn't we be using the same triangle as everywhere else?
@gavrelina I like the look of the
[+]/[–]thing, but shouldn't we be using the same triangle as everywhere else?
You're right. Using ▶ and ▼ would make it more consistent.
Initially [+] [-] was there to prevent repeating similar icons for 'sorting' and possible similarities with the 'static/temporal' components. But neither of those is used now (!! Except the sorting icon for Chunk store browser, which we shall also change to ), hence it's not justified.
Screenshot with ▶ and ▼ for visibility:
New proposal:
Components are grouped by entities (before we can group them by archetypes through tagged components)
- Each of the instance could be "uncollapsed" until the last index of its entity.
- One can uncollapse by pressing an icon, which appears only on hover
- Simultaneously the other instances are uncollapsed as well until the index of the initiated item. I.e. compA[0-5], compB[0-15], if I uncollapse via compA I will see CompA[0,1,2,3,4,5] and for CompB[0,1,2,3,4,5]+10 more.
- If there are more instances for certain component we display "N more" with ability to uncollapse further.
- When uncollapsed — each of the rows serves as a way to collapse everything back to a "summary row".
- When uncollapsed : we still see a summary row with the total number of instances for each component.
- If one scrolls down to uncollapsed instance batch that is longer then the rest -> we explore the sticky behavior for the latest known values for other components.
- have a separate column with (shared) indices => to help users see which [N] is a certain value they are looking at instead of calculating (is it [61?] or [62?]).
Interactions: https://github.com/user-attachments/assets/2c6ef858-9aff-4181-ad96-d7fe15504adc
@abey79 one more improvement thingy! to add "zebra" lines for the ones that are expanded (to make it easier to scan through them)? I believe @emilk mentioned it was possible!
@gavrelina I'll do that in a follow-up PR, should be too back. Tracking this here:
- https://github.com/rerun-io/rerun/issues/7412