-
Notifications
You must be signed in to change notification settings - Fork 171
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
Respect spans when resizing grid cells #6685
Conversation
#15303 Bundle Size — 58.12MiB (~+0.01%).6be5569(current) vs d1d46c1 master#15294(baseline) Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
|
Current #15303 |
Baseline #15294 |
|
---|---|---|
Initial JS | 41.09MiB (~+0.01% ) |
41.09MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 18.19% |
18.07% |
Chunks | 20 |
20 |
Assets | 22 |
22 |
Modules | 4174 |
4174 |
Duplicate Modules | 213 |
213 |
Duplicate Code | 27.28% |
27.28% |
Packages | 477 |
477 |
Duplicate Packages | 70 |
70 |
Bundle size by type 2 changes
1 regression
1 improvement
Current #15303 |
Baseline #15294 |
|
---|---|---|
JS | 58.11MiB (~+0.01% ) |
58.11MiB |
HTML | 9.4KiB (-0.21% ) |
9.42KiB |
Bundle analysis report Branch fix/grid-cell-resize-spans Project dashboard
Generated by RelativeCI Documentation Report issue
const elementGridPropertiesFromProps = | ||
selectedElementMetadata.specialSizeMeasurements.elementGridPropertiesFromProps | ||
|
||
const width = |
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.
I don't like the term width
/height
because I'm always mistaken that it is a geometrical width/height (in pixels). Is there a better name for this? Maybe columnCount
and rowCount
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 total sense, fixed in 6be5569
(#6685)
**Problem:** Resizing grid cells always forces explicit numerical placement pins, chomping any `span`s that may have been defined on the cell. **Fix:** After determining the right numerical positions for the resized cell bounds, do a normalization pass so that the new grid props are rewritten to respect the new bounds but also to express them with `spans` if the original pins were spans in the first place. For example, assuming enlarging to the right by 1 cell: | Initial | Result | |--------|----------| | `gridColumn: span 2` | `gridColumn: span 3` | | `gridColumn 3 / span 2` | `gridColumn: 3 / span 3` | **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Play mode Fixes #6683
Problem:
Resizing grid cells always forces explicit numerical placement pins, chomping any
span
s that may have been defined on the cell.Fix:
After determining the right numerical positions for the resized cell bounds, do a normalization pass so that the new grid props are rewritten to respect the new bounds but also to express them with
spans
if the original pins were spans in the first place.For example, assuming enlarging to the right by 1 cell:
gridColumn: span 2
gridColumn: span 3
gridColumn 3 / span 2
gridColumn: 3 / span 3
Manual Tests:
I hereby swear that:
Fixes #6683