Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid-specific hug strategy #6087

Merged
merged 8 commits into from
Jul 18, 2024
Merged

grid-specific hug strategy #6087

merged 8 commits into from
Jul 18, 2024

Conversation

bkrmendy
Copy link
Contributor

@bkrmendy bkrmendy commented Jul 16, 2024

Problem

The basic hug contents strategy doesn't really make sense for grids.

Fix

Create a hug contents strategy tailored to grids. When setting a grid to hug along an axis, if the grid doesn't use any fr units in gridTemplate{Row | Column} along that axis, the width/height prop is removed from that axis, so the grid is sized by its template rows or columns. If there's an fr unit ingridTemplate{Row | Column}, the strategy is not applicable because the fr only works if the grid is sized

Copy link
Contributor

github-actions bot commented Jul 16, 2024

Try me

Copy link

relativeci bot commented Jul 16, 2024

#13410 Bundle Size — 62.66MiB (~+0.01%).

917e776(current) vs 6339ece master#13403(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#13410
     Baseline
#13403
Regression  Initial JS 45.73MiB(+0.01%) 45.73MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 21.58% 21.56%
No change  Chunks 31 31
No change  Assets 34 34
No change  Modules 4371 4371
No change  Duplicate Modules 521 521
No change  Duplicate Code 31.68% 31.68%
No change  Packages 469 469
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#13410
     Baseline
#13403
Regression  JS 62.65MiB (~+0.01%) 62.65MiB
Improvement  HTML 11.16KiB (-0.33%) 11.2KiB

Bundle analysis reportBranch fix/set-grid-to-hugProject dashboard

@bkrmendy bkrmendy marked this pull request as ready for review July 17, 2024 12:00
@bkrmendy bkrmendy merged commit 45f8cbe into master Jul 18, 2024
15 checks passed
@bkrmendy bkrmendy deleted the fix/set-grid-to-hug branch July 18, 2024 09:29
liady pushed a commit that referenced this pull request Dec 13, 2024
## Problem
The basic hug contents strategy doesn't really make sense for grids.

## Fix
Create a hug contents strategy tailored to grids. When setting a grid to
hug along an axis, if the grid doesn't use any `fr` units in
`gridTemplate{Row | Column}` along that axis, the width/height prop is
removed from that axis, so the grid is sized by its template rows or
columns. If there's an `fr` unit in`gridTemplate{Row | Column}`, the
strategy is not applicable because the `fr` only works if the grid is
sized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants