-
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
Better grid reparent #6499
Merged
Merged
Better grid reparent #6499
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
#14658 Bundle Size — 57.74MiB (~-0.01%).9c0b295(current) vs 916e8b9 master#14647(baseline) Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
|
Current #14658 |
Baseline #14647 |
|
---|---|---|
Initial JS | 40.74MiB (~-0.01% ) |
40.74MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 17.97% |
17.95% |
Chunks | 21 |
21 |
Assets | 23 |
23 |
Modules | 4113 |
4113 |
Duplicate Modules | 213 |
213 |
Duplicate Code | 27.41% |
27.41% |
Packages | 475 |
475 |
Duplicate Packages | 70 |
70 |
Bundle size by type 2 changes
2 improvements
Current #14658 |
Baseline #14647 |
|
---|---|---|
JS | 57.73MiB (~-0.01% ) |
57.73MiB |
HTML | 7.37KiB (-0.25% ) |
7.39KiB |
Bundle analysis report Branch chore/better-grid-reparent Project dashboard
Generated by RelativeCI Documentation Report issue
gbalint
requested review from
seanparsons,
Rheeseyb,
ruggi,
balazsbajorics,
liady and
bkrmendy
October 8, 2024 16:58
bkrmendy
approved these changes
Oct 9, 2024
ruggi
approved these changes
Oct 9, 2024
balazsbajorics
approved these changes
Oct 9, 2024
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.
beautiful!
liady
pushed a commit
that referenced
this pull request
Dec 13, 2024
**Problem:** One of the root causes of some major issues is that the grid reparent strategies were not created by the general reparent-metastrategy, but the grid-rearrange-move strategy itself. **Fix:** - Removed reparent strategy creation from grid-rearrange-move. After this grid-rearrange-move is always selectable when dragging from a grid, even when outside of a grid (so you can manually switch to this strategy and the child will jump back to the original grid, into the cell which is closest to the mouse). This is a behavior which is similar to flex reorder. - reparent-metastrategy can create a reparent into grid strategy. To achieve this I just had to allow `GRID_CELL_HANDLE` controls in the strategy factory. - Fortunately reparent-metastrategy does not allow reparenting into the same parent, so this automagically solved the problem that reparenting inside the original grid should just do a rearrange (because the reparent strategy is not even selectable in that case) - With this solution, when reparenting from one grid to a different grid, the grid controls were shown on both the original and the new parent grid too. Unfortunately, the grid controls do not support showing the controls on multiple grid instances at the same time (e.g. they shared the state that which cell was highlighted), so I had to switch the grid control of the rearrange strategy to `visible-only-while-active` (so it is not visible on the original grid when the reparent strategy is active) - I had to make sure the grid specific style props are removed during all kinds of reparent (earlier this was manually handled in the grid specific code) - I could remove plenty of reparent specific code lines from `grid-rearrange-move-strategy.ts` - In the earlier solution reparent to flow was the default when repareing into a flow target, but in our regular reparent flow reparent is never the default. Because of this I had to rewrite one test to select the flow strategy manually. **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:
One of the root causes of some major issues is that the grid reparent strategies were not created by the general reparent-metastrategy, but the grid-rearrange-move strategy itself.
Fix:
GRID_CELL_HANDLE
controls in the strategy factory.visible-only-while-active
(so it is not visible on the original grid when the reparent strategy is active)grid-rearrange-move-strategy.ts
Manual Tests:
I hereby swear that: