refactor(IgxGridSummaries): Refactor how summaries height is calculated. #15604
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #15603
This is related to the purging of hardcoded sizes as part of part 1. from #14048 (comment). Specifically
defaultSummaryHeight
.This is more of a proposal (hence why it's a draft), since it introduces some breaking changes and will probably break a lot of tests. So it would be best to evaluate it before putting in the effort.
In general, the reason for the
defaultSummaryHeight
's hardcoded values is due to the fact that horizontal virtualization renders only the visible part of the summary row and summaries can have different size depending on the number of summaries per column. To have consistent size between chunks it currently sets a fixed summary height =defaultSummaryHeight
* the max summary length for all columns in the grid.So to remove the hardcoded sizes and just have the dom flex and size itself I've changed the structure in the summary cell so it renders and item (empty if there's no summary there) for all summaries up to the total summaries count in the grid and have them use css with
flex-basis
based on the density. For example:That way everything should flex with the content correctly without hardcoded sizes.
Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)