-
Notifications
You must be signed in to change notification settings - Fork 172
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#13410 Bundle Size — 62.66MiB (~+0.01%).
Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
|
Current #13410 |
Baseline #13403 |
|
---|---|---|
Initial JS | 45.73MiB (+0.01% ) |
45.73MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 21.58% |
21.56% |
Chunks | 31 |
31 |
Assets | 34 |
34 |
Modules | 4371 |
4371 |
Duplicate Modules | 521 |
521 |
Duplicate Code | 31.68% |
31.68% |
Packages | 469 |
469 |
Duplicate Packages | 70 |
70 |
Bundle size by type 2 changes
1 regression
1 improvement
Current #13410 |
Baseline #13403 |
|
---|---|---|
JS | 62.65MiB (~+0.01% ) |
62.65MiB |
HTML | 11.16KiB (-0.33% ) |
11.2KiB |
Bundle analysis report Branch fix/set-grid-to-hug Project dashboard
ruggi
approved these changes
Jul 17, 2024
bkrmendy
requested review from
gbalint,
seanparsons,
Rheeseyb,
balazsbajorics and
liady
July 18, 2024 07:54
editor/src/components/inspector/inspector-strategies/hug-contents-basic-strategy.ts
Show resolved
Hide resolved
balazsbajorics
approved these changes
Jul 18, 2024
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
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.
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 ingridTemplate{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 anfr
unit ingridTemplate{Row | Column}
, the strategy is not applicable because thefr
only works if the grid is sized