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

Reorder in grid reparent #6552

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Reorder in grid reparent #6552

merged 2 commits into from
Oct 17, 2024

Conversation

gbalint
Copy link
Contributor

@gbalint gbalint commented Oct 16, 2024

Problem:
We use grid-rearrange-move code after reparenting into a grid to position the element into the target cell.
However, reorder mode of grid-rearrange-move is never activated, so we set explicit gridRow/gridColumn props even when unnecessary.

Fix:

  • Run the grid rearrange move commands after the reparent commands
  • Add new optional parameter to runGridRearrangeMove called newPathAfterReparent so it knows about the new path (end can use it in the commands)
  • Make the code to decide which mode (rearrange or reorder) work even when the target is not originally in the new parent.

Manual Tests:
I hereby swear that:

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

Copy link
Contributor

github-actions bot commented Oct 16, 2024

Try me

Copy link

relativeci bot commented Oct 16, 2024

#14836 Bundle Size — 57.97MiB (~+0.01%).

20527c4(current) vs 916e8b9 master#14833(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#14836
     Baseline
#14833
Regression  Initial JS 40.96MiB(~+0.01%) 40.96MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 17.99% 17.87%
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.34% 27.34%
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
#14836
     Baseline
#14833
Regression  JS 57.97MiB (~+0.01%) 57.96MiB
Improvement  HTML 7.37KiB (-0.25%) 7.39KiB

Bundle analysis reportBranch fix/reorder-in-grid-reparentProject dashboard


Generated by RelativeCIDocumentationReport issue

@gbalint gbalint marked this pull request as ready for review October 16, 2024 19:36
@gbalint gbalint merged commit ed378ef into master Oct 17, 2024
16 checks passed
@gbalint gbalint deleted the fix/reorder-in-grid-reparent branch October 17, 2024 10:24
liady pushed a commit that referenced this pull request Dec 13, 2024
**Problem:**
We use grid-rearrange-move code after reparenting into a grid to
position the element into the target cell.
However, `reorder` mode of grid-rearrange-move is never activated, so we
set explicit gridRow/gridColumn props even when unnecessary.

**Fix:**
- Run the grid rearrange move commands after the reparent commands
- Add new optional parameter to `runGridRearrangeMove` called
`newPathAfterReparent` so it knows about the new path (end can use it in
the commands)
- Make the code to decide which mode (rearrange or reorder) work even
when the target is not originally in the new parent.

**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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants