h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
3.9k stars 323 forks source link

fix/feat: Adjust progress_table_cell_type not to increase table row height #1921 #2215

Open kaitlyncliu opened 6 months ago

kaitlyncliu commented 6 months ago

The PR fulfills these requirements: (check all the apply)

This is how the table.py example looks originally: Screenshot 2023-12-06 at 12 14 35 PM

Without the Progress column, the row height would look like this, which has a row height that is noticeably shorter than with the Progress:

Screen Shot 2023-12-06 at 1 21 50 AM

Our implementation results in a bar that looks like the following and maintains a similar row height to the row without a progress cell: Screenshot 2023-12-06 at 12 14 21 PM

We default type to the spinner/arc progress indicator so that previously implemented tables will continue to look the same.

The UI and unit tests still pass:

Screen Shot 2023-12-06 at 7 25 58 PM Screen Shot 2023-12-06 at 7 26 39 PM

Closes #1921

kellyycha commented 6 months ago

Hi @mturoci I added the python example file called table_progress.py, wrote documentation for https://wave.h2o.ai/docs/widgets/form/table/, changed the attribute from type to compact using make generate, and cleaned up the CSS, but am still unsure about the width of the progress arc and bar being fluid instead of a set number. Please let me know what you think and if there are any more changes necessary!

mturoci commented 6 months ago

The changes look better now. Good job @kaitlyncliu!

am still unsure about the width of the progress arc and bar being fluid instead of a set number.

I meant this:

https://github.com/h2oai/wave/assets/64769322/a5f70c58-2382-4388-8ecd-3491b5224f03

Hint: Have a look at flexbox and its flex-grow prop :)