-
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
Support repeat()
in grid templates
#6090
Conversation
@@ -943,11 +943,35 @@ export function parseGridRange( | |||
} | |||
} | |||
|
|||
// this regex matches 'repeat ( [unit] , [value] )', capturing groups around the unit (1) and the value (2) | |||
const reRepeatFunction = /repeat\s*\(\s*(\d+)\s*,\s*([^,\)]+)\s*\)/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a note - maybe add a TODO to support non-units repeaters (i.e auto-fit
, auto-fill
, etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, done ✅
#13416 Bundle Size — 62.63MiB (-0.05%).
Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
|
Current #13416 |
Baseline #13413 |
|
---|---|---|
Initial JS | 45.7MiB (-0.07% ) |
45.73MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 26.47% |
21.56% |
Chunks | 31 |
31 |
Assets | 34 |
34 |
Modules | 4374 (+0.07% ) |
4371 |
Duplicate Modules | 523 (+0.38% ) |
521 |
Duplicate Code | 31.69% (+0.03% ) |
31.68% |
Packages | 469 |
469 |
Duplicate Packages | 70 |
70 |
Bundle size by type 2 changes
2 improvements
Current #13416 |
Baseline #13413 |
|
---|---|---|
JS | 62.62MiB (-0.05% ) |
62.65MiB |
HTML | 11.16KiB (-0.33% ) |
11.2KiB |
Bundle analysis report Branch feat/grid-template-repeat Project dashboard
**Problem:** Grids with `repeat()` in their template are correctly displayed, but cannot be resized because the dimensions are `FALLBACK`. **Fix:** Expand the `repeat()` functions inside the templates when parsing them, so they are calculated correctly. https://github.com/user-attachments/assets/7744262c-f701-4685-a357-6ddaf9685bca Fixes #6089
Problem:
Grids with
repeat()
in their template are correctly displayed, but cannot be resized because the dimensions areFALLBACK
.Fix:
Expand the
repeat()
functions inside the templates when parsing them, so they are calculated correctly.Screen.Recording.2024-07-17.at.12.10.05.mov
Fixes #6089