h2oai / h2oai/wave

Default Grouped Table

Open
#1,305 1 comment 0 reactions 0 assignees View on GitHub
feature ui
Dominant language
Python
Stars
4.3k
Forks
371
Avg merge
26d 1h
Merged PRs (30d)
1

Description

#### Is your feature request related to a problem? Please describe
There are many times when we might want to show tabular data to our users with a known, multi-column grouped structure. Today, we can ask users to group themselves and we have a non-grouped table where we just order the data how we want ahead of time, but we can't really show specific, grouped data

#### Describe the solution you'd like
A new parameter for `ui.table_column` called `grouped`. This is not `groupable` because it is not a user action, we are stating we want the data to be displayed in a specific way:

```python
ui.table(
name='deployments',
multiple=False,
groupable=False,
height='600px',
width='100%',
columns=[
ui.table_column(name="deployment_name", label="Deployment name", sortable=True, min_width="300px", groupped=True),
ui.table_column(name="model_name", label="Model name", sortable=True, min_width="300px", groupped=True),
ui.table_column(name="model_version", label="Model version", sortable=True, min_width="300px"),

], rows=[
ui.table_row(name="1", cells=["Regression deployment", "Customer Churn Fast", "1"]),
ui.table_row(name="2", cells=["Binary classification", "Fraud Detection", "1"]),
ui.table_row(name="3", cells=["Credit Card", "Fastest settings", "1"]),
ui.table_row(name="4", cells=["Credit Card", "Baseline settings", "2"]),
ui.table_row(name="5", cells=["Credit Card", "Most interpretable", "3"]),

]
)
```
![image](https://user-images.githubusercontent.com/4793561/159758065-a985a6a0-2660-4ea9-8d63-6b56bd3f5bdf.png)

#### Additional context
This is potentially related to #203 but a proposed different solution

Contributor guide

Open the contributing guide

Research direction

Start by tracing the `ui.table_column` parameter and the table rendering path, then compare the related discussion in issue #203. The work is done when a `grouped` column option displays the specified multi-column grouped structure in `ui.table` as shown by the issue example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.