Skip to content

MudTable grouping#1921

Merged
henon merged 6 commits intoMudBlazor:devfrom
HClausing:TableGrouping
Jul 2, 2021
Merged

MudTable grouping#1921
henon merged 6 commits intoMudBlazor:devfrom
HClausing:TableGrouping

Conversation

@HClausing
Copy link
Member

Grouping feature for MudTable, with Group Header and Footer Rows, allowing Summaries on both.

It works on recursive way, so it's possible to have unlimited inner groups.

Proposal for #1475 , and replacement for #1879.

Also added overflow-y:auto to mud-table-container css class to avoid rows getting outsite from table container when table has fixed height, or doesn't use fixed header neither horizontal scrollbar. Example here: https://try.mudblazor.com/snippet/GOcFYqlCavftHnBY

Reviews are always welcome.

@HClausing HClausing changed the title Added recursive grouping behavior for MudTable<T>, with group header … MudTable grouping Jun 18, 2021
@henon
Copy link
Contributor

henon commented Jun 20, 2021

Here is some feedback:

I think we should remove the checkbox from the footer

image

Also I am not entirely satisfied how the header row and the footer row look. Right now a footer is immediately followed by a header without any spacing between them. This is quite puzzling on first glance.

I suggest we look how other toolkits do it to find a good default look for row groups with header and footer.

@henon
Copy link
Contributor

henon commented Jun 20, 2021

The presentation problem is even more apparent when you look at multi-level grouping:

image

@HClausing
Copy link
Member Author

Thanks. I appreciate your feedback, and I totally agree.

I'll try find a more elegant way to present the rows when using group footer.

@HClausing HClausing marked this pull request as draft June 21, 2021 16:05
@henon
Copy link
Contributor

henon commented Jun 22, 2021

Would you mind renaming MudTGroupRow to MudTableGroupRow ?

@HClausing
Copy link
Member Author

Good ideia. I'll rename
Thanks.

@HClausing HClausing marked this pull request as ready for review June 24, 2021 17:55
@HClausing
Copy link
Member Author

The current MudTable Grouping behavior (every group header is gray but my gif is under low color quality, sorry):

grp

@henon
Copy link
Contributor

henon commented Jun 24, 2021

It looks a lot better already. I love the expandable function. However I think like this it would be even better (I quickly threw this sketch together):

image

I am talking about the order of the expansion icon and the checkbox. Also the example would be so much more intuitive if we would group by the big element groups: Metals, Non-metals, etc. I know it is more work, but it would be a wow-effect.

@henon
Copy link
Contributor

henon commented Jun 24, 2021

Actually it is not much work because we have the Group property on Element. I just pushed an update to the group names so that they are better suited for this example.

@HClausing
Copy link
Member Author

It looks a lot better already. I love the expandable function. However I think like this it would be even better (I quickly threw this sketch together):

image

I am talking about the order of the expansion icon and the checkbox. Also the example would be so much more intuitive if we would group by the big element groups: Metals, Non-metals, etc. I know it is more work, but it would be a wow-effect.

Oh really, I've inverted the order 🙄.

I'm working on it, and the biggest challenge is about to get the ensure the correct indentation without break the column width.

@HClausing HClausing marked this pull request as draft June 25, 2021 02:43
…and footer templates.

Also added overflow-y:auto to mud-table-container css class to avoid rows getting outsite from table container when table has fixed height, or doesn't use fixed header neither horizontal scrollbar
 - Removed MultiSelection checkbox from Footer Row;
 - Removed gray background stylee on Footer Rows from Docs.
 - Added Expandable parameter.
 - Added tests for Indentation and Expandable.
Changed GroupExpander Toogle and MultiSelection Checkbox to the sasme Tr column;
Fixed some misalignment when Indent is active;
Fixed header row that was being rendered as MudTd instead of MudTr
Some updates on examples.
@HClausing HClausing marked this pull request as ready for review June 28, 2021 18:36
@HClausing
Copy link
Member Author

HClausing commented Jun 28, 2021

After sosme days testing and rendering, I've made some progress:

image

Now, about the empty space between expander toggle / checkbox and first column, I guess a better looking will be only possible when the PR #1110 ne merged, because will be possible to override the MudTd of the first column adding these components before.

image

Note: Footer margin doesn't work when Dense layout is active.

@henon
Copy link
Contributor

henon commented Jun 28, 2021

It looks awesome!

@HClausing
Copy link
Member Author

It looks awesome!

Thanks!

@henon
Copy link
Contributor

henon commented Jul 1, 2021

@mikes-gh @Garderoben do you think this is OK to be merged now?

@Garderoben
Copy link
Member

@mikes-gh @Garderoben do you think this is OK to be merged now?

Design wise, YES!

@henon henon merged commit 105930a into MudBlazor:dev Jul 2, 2021
@henon
Copy link
Contributor

henon commented Jul 2, 2021

Many many thanks!

@Yomodo
Copy link
Contributor

Yomodo commented Jul 2, 2021

Wonderful! Thanks.

@HClausing HClausing deleted the TableGrouping branch July 9, 2021 11:43
@henon
Copy link
Contributor

henon commented Feb 11, 2023

@HClausing The guys from PVS found a bug in razor that was added in this PR, see https://pvs-studio.com/en/blog/posts/csharp/1023/

I have commented above accordingly.

@henon henon mentioned this pull request Feb 11, 2023
2 tasks
@HClausing HClausing mentioned this pull request Feb 23, 2023
6 tasks
@henon henon added the legendary Marks contributions that are highly valuable, innovative, or significantly impactful to the project label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

legendary Marks contributions that are highly valuable, innovative, or significantly impactful to the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants