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

Fix getGridRelativeContainingBlock for flow elements #6713

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Dec 9, 2024

Problem:

getGridRelativeContainingBlock doesn't correctly return the item position for flow elements. It was temporarily patched with the positioning coming from getGridChildCellCoordBoundsFromCanvas, but this PR instead fixes it for good, which cascade-solves a bunch of other small bugs.

Fix:

The flow positioning requires all preceding grid items to be available in the grid, so this PR does just that: inject every (ordered!) child into the temporary grid, retrieve the wanted one, and return its bounding box.

Manual Tests:
I hereby swear that:

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

Fixes #6712

Copy link
Contributor

github-actions bot commented Dec 9, 2024

Try me

Copy link

relativeci bot commented Dec 9, 2024

#15389 Bundle Size — 58.21MiB (~-0.01%).

39573e6(current) vs d1d46c1 master#15388(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Improvement 1 improvement
                 Current
#15389
     Baseline
#15388
Improvement  Initial JS 41.18MiB(~-0.01%) 41.18MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 18.24% 0%
No change  Chunks 20 20
No change  Assets 22 22
No change  Modules 4189 4189
No change  Duplicate Modules 213 213
No change  Duplicate Code 27.24% 27.24%
No change  Packages 477 477
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Improvement 2 improvements
                 Current
#15389
     Baseline
#15388
Improvement  JS 58.2MiB (~-0.01%) 58.2MiB
Improvement  HTML 9.4KiB (-0.21%) 9.42KiB

Bundle analysis reportBranch fix/grid-relative-containing-blo...Project dashboard


Generated by RelativeCIDocumentationReport issue

@ruggi ruggi merged commit 544461a into master Dec 10, 2024
16 checks passed
@ruggi ruggi deleted the fix/grid-relative-containing-block-flow branch December 10, 2024 10:39
liady pushed a commit that referenced this pull request Dec 13, 2024
**Problem:**

`getGridRelativeContainingBlock` doesn't correctly return the item
position for flow elements. It was temporarily patched with the
positioning coming from `getGridChildCellCoordBoundsFromCanvas`, but
this PR instead fixes it for good, which cascade-solves a bunch of other
small bugs.

**Fix:**

The flow positioning requires _all_ preceding grid items to be available
in the grid, so this PR does just that: inject every (ordered!) child
into the temporary grid, retrieve the wanted one, and return its
bounding box.

**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 #6712
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.

Correctly calculate the relative containing block for grid flow elements
3 participants