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

Show Controls And Update Grids With Generated Content #6553

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

seanparsons
Copy link
Contributor

@seanparsons seanparsons commented Oct 16, 2024

Problem:
When the entries inside a grid are generated from something like a map expression, none of the grid handling works for when the elements are selected.

Fix:
Mostly this uses a function to look up the hierarchy for an uninherited grid layout system. As previously the assumption was that the direct parent of a grid item within our hierarchy would be the grid.

Video:
https://github.com/user-attachments/assets/609db057-30a5-47e8-bd15-decc71ec671b

Commit Details:

  • Simplified isGridCell.
  • Implemented findOriginalGrid utility function.
  • Added update to layoutSystemForChildrenInherited to fillLayoutSystemForChildrenFromAncestors.
  • useGridData now uses findOriginalGrid to look up the hierarchy to find the grid we're interested in.
  • resizeGridStrategy now uses findOriginalGrid to find the correct element to update.
  • DOM walker defaults layoutSystemForChildrenInherited to false.

Manual Tests:
I hereby swear that:

  • I opened a hydrogen project and it loaded
  • I could navigate to various routes in Play mode

- Simplified `isGridCell`.
- Implemented `findOriginalGrid` utility function.
- Added update to `layoutSystemForChildrenInherited` to `fillLayoutSystemForChildrenFromAncestors`.
- `useGridData` now uses `findOriginalGrid` to look up the hierarchy to find the grid
  we're interested in.
- `resizeGridStrategy` now uses `findOriginalGrid` to find the correct element to update.
- DOM walker defaults `layoutSystemForChildrenInherited` to false.
Copy link
Contributor

github-actions bot commented Oct 16, 2024

Try me

Copy link

relativeci bot commented Oct 16, 2024

#14847 Bundle Size — 57.98MiB (~+0.01%).

60fd5d2(current) vs 916e8b9 master#14846(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#14847
     Baseline
#14846
Regression  Initial JS 40.96MiB(~+0.01%) 40.96MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 18% 17.88%
No change  Chunks 20 20
No change  Assets 22 22
No change  Modules 4153 4153
No change  Duplicate Modules 213 213
No change  Duplicate Code 27.33% 27.33%
No change  Packages 477 477
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#14847
     Baseline
#14846
Regression  JS 57.97MiB (~+0.01%) 57.97MiB
Improvement  HTML 7.37KiB (-0.25%) 7.39KiB

Bundle analysis reportBranch fix/generated-grid-updatesProject dashboard


Generated by RelativeCIDocumentationReport issue

@seanparsons seanparsons marked this pull request as ready for review October 17, 2024 10:54
@seanparsons seanparsons merged commit 07d1bbd into master Oct 17, 2024
16 checks passed
@seanparsons seanparsons deleted the fix/generated-grid-updates branch October 17, 2024 16:57
liady pushed a commit that referenced this pull request Dec 13, 2024
- Simplified `isGridCell`.
- Implemented `findOriginalGrid` utility function.
- Added update to `layoutSystemForChildrenInherited` to
`fillLayoutSystemForChildrenFromAncestors`.
- `useGridData` now uses `findOriginalGrid` to look up the hierarchy to
find the grid we're interested in.
- `resizeGridStrategy` now uses `findOriginalGrid` to find the correct
element to update.
- DOM walker defaults `layoutSystemForChildrenInherited` to false.
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