deephaven / web-client-ui

Deephaven Web Client UI
Apache License 2.0
29 stars 31 forks source link

Option to show rollup grouping values only on the 'rolled-up' row #1555

Closed rbasralian closed 10 months ago

rbasralian commented 1 year ago

A user has requested that rollups only display the aggregation key values in the "rolled-up" row, and not in the expanded rows. For example, instead of a rollup looking like this:

image

they'd prefer it like this:

image

Below are examples from other UIs.

ag-grid: image

Excel: image

Relates to #1483.

vbabich commented 1 year ago

We'd need a sticky row to display the aggregation key. This is a bit more complicated than just not showing the key.

rbasralian commented 1 year ago

Excel does not appear to sticky the row, FWIW

Example expanded pivot table: image

Same thing after scrolling down a few rows — note the grouping values are no longer visible:

image

It is still probably more of a concern for us (since the data will usually be dynamic, so added/removed rows or rollup keys can make it harder to track the context of what you're looking at).

rbasralian commented 1 year ago

From further discussion, what they really want is for the keys to be in their own column, as in the ag-grid example:

image

They are not concerned about keeping the aggregation keys 'sticky'.

dsmmcken commented 1 year ago

As in dumping all the keys into one visual column?

That would make it hard to sort or filter the columns.

rbasralian commented 1 year ago

The key columns could still exist independently as well (e.g. "Name" here: https://github.com/ag-grid/ag-grid/blob/latest/github-grid-demo.jpg)

dsmmcken commented 1 year ago

If duplicating is desirable I guess that would work, to show it.

The other concern I have is that column is no longer an actual column of data, like it would be purely a visual column that is pretending to be one column of data, when it is actually several. So that could also be mis-leading. Do you have thoughts on that.

Like say you group on sym + exchange. Do you present a new column with a made-up name like "Roll-up" or "Group" as in that ag-grid containing the mixed ones, but then also duplicate in a sym/exchange columns as well still? That "Roll-up" or "Group" column wouldn't actually exist on the table though, and we've also added table width by duplicating.

Just trying to talk through all the problems if we want to arrive at a better solution.

rbasralian commented 1 year ago

I agree that it's a bit unnatural for us to have a "fake column" that's really just a UI construct.

Keeping the original real columns (e.g. "Sym" and "Exchange") in addition to the synthetic "Group" column is actually what makes it tolerable to me; you can still use the real columns for filtering/sorting/seeing clearly which row you're looking at even if you've scrolled, and the "Group" column is just for expanding/collapsing rollup levels.

We'd have to add the "Group" column for CSV exports too. It's also a bit awkward to add it there, but I assume not too different to implement than doing it in the UI.

dsmmcken commented 11 months ago

To clarify the requested change for @mofojed

  1. When a rollup is created a new virtual column should be added called "Group", It should contain the just the top node value at each depth.
  2. The original columns should still exist.
  3. The context menu should be maintained for cells that have a value, and be proxied to operate on the actual columns (such a selecting a row and filtering by value, should filter the column that node would be from), and the expand depth menu should still be present.
  4. The virtual column should not be moveable, and always the first column. The virtual column would not have a quick filter box, and not be sortable.
  5. The column should still be hide able.