-
Notifications
You must be signed in to change notification settings - Fork 170
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
Make grid rearrange work in grid components #6589
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
#14932 Bundle Size — 57.98MiB (~+0.01%).3bb7351(current) vs 916e8b9 master#14928(baseline) Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
|
Current #14932 |
Baseline #14928 |
|
---|---|---|
Initial JS | 40.97MiB (~+0.01% ) |
40.96MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 18% |
0% |
Chunks | 20 |
20 |
Assets | 22 |
22 |
Modules | 4152 |
4152 |
Duplicate Modules | 213 |
213 |
Duplicate Code | 27.33% |
27.33% |
Packages | 477 |
477 |
Duplicate Packages | 70 |
70 |
Bundle size by type 2 changes
1 regression
1 improvement
Current #14932 |
Baseline #14928 |
|
---|---|---|
JS | 57.98MiB (~+0.01% ) |
57.97MiB |
HTML | 7.37KiB (-0.25% ) |
7.39KiB |
Bundle analysis report Branch fix/grid-components Project dashboard
Generated by RelativeCI Documentation Report issue
ruggi
approved these changes
Oct 25, 2024
seanparsons
approved these changes
Oct 25, 2024
2 tasks
gbalint
added a commit
that referenced
this pull request
Oct 30, 2024
**Problem:** Fix grid-element-resize strategy in grid components. **Fix:** Similarly to #6589 , use the specialSizeMeasurements of the grid item to get the grid properties (and not the parent element) **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
liady
pushed a commit
that referenced
this pull request
Dec 13, 2024
**Problem:** Grid rearrange does not work when the grid is a root element of a component. **Fix:** The problem is that we assume that the parent element of a grid item is the grid itself. However, when the grid is in a component, the parent element is the component instance, and not the grid element inside it. This is a problem because we can not find the grid measurement helper from the parent element path. The solution is that all necessary grid related measurement data should be available in the metadata of the grid items themselves. - Added new fields to specialSizeMeasurements about the parent grid - Rewrote grid rearrange strategies and helpers to rely on the specialSizeMeasurements of the item, and not of the parent. Still unsolved: - Grid strategies set the props of the grid controls (e.g. to show which is the highlighted cell). These still assume that the control is on the parent, which is true in cases when the grid is root element of a component. Solving the problem for more problematic cases is out of scope for this PR. **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
liady
pushed a commit
that referenced
this pull request
Dec 13, 2024
**Problem:** Fix grid-element-resize strategy in grid components. **Fix:** Similarly to #6589 , use the specialSizeMeasurements of the grid item to get the grid properties (and not the parent element) **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
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:
Grid rearrange does not work when the grid is a root element of a component.
Fix:
The problem is that we assume that the parent element of a grid item is the grid itself. However, when the grid is in a component, the parent element is the component instance, and not the grid element inside it. This is a problem because we can not find the grid measurement helper from the parent element path.
The solution is that all necessary grid related measurement data should be available in the metadata of the grid items themselves.
Still unsolved:
Manual Tests:
I hereby swear that: