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

Reparent out of grid #6264

Merged
merged 5 commits into from
Aug 27, 2024
Merged

Reparent out of grid #6264

merged 5 commits into from
Aug 27, 2024

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Aug 27, 2024

Problem:

It's currently not possible to reparent out of a grid.

Fix:

Allow reparenting out of a grid while holding cmd, like all other reparenting scenarios.

Kapture.2024-08-27.at.13.21.53.mp4

Notes:
The grid rearrange strategy now needs to act as a sort of meta strat, because 1) it needs a custom mouse drag handling (due to the grid placeholder controls) and 2) cells don't have positioning props so absolute reparenting needs some massaging in order to work

Fixes #6263

show: 'visible-only-while-active',
}),
],
controlsToRender: controlsForAbsoluteReparent(reparentTarget),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no logic changes here, just factored out the controls and the apply logic

priority: 'bottom',
},
],
controlsToRender: controlsForGridReparent(reparentTarget),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no logic changes, just factored out the controls and the apply logic

show: 'visible-only-while-active',
}),
],
controlsToRender: controlsForStaticReparent(reparentTarget),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no logic changes, just factored out the controls

Copy link
Contributor

github-actions bot commented Aug 27, 2024

Try me

Copy link

relativeci bot commented Aug 27, 2024

#13955 Bundle Size — 62.51MiB (~+0.01%).

05cfeea(current) vs 916e8b9 master#13941(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#13955
     Baseline
#13941
Regression  Initial JS 45.64MiB(~+0.01%) 45.63MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 21.54% 21.51%
No change  Chunks 30 30
No change  Assets 33 33
No change  Modules 4375 4375
No change  Duplicate Modules 519 519
No change  Duplicate Code 31.64% 31.64%
No change  Packages 472 472
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#13955
     Baseline
#13941
Regression  JS 62.5MiB (~+0.01%) 62.49MiB
Improvement  HTML 11.05KiB (-0.33%) 11.09KiB

Bundle analysis reportBranch feat/reparent-out-of-gridProject dashboard


Generated by RelativeCIDocumentationReport issue

updateSelectedViews('always', newPaths),
setCursorCommand(CSSCursor.Reparent),
showGridControls('mid-interaction', reparentTarget.newParent.intendedParentPath),
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a setElementsToRerender command is missing from here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was removed on purpose in #6258 because it doesn't look right with the grid placement

@ruggi ruggi merged commit 3ded8ef into master Aug 27, 2024
16 checks passed
@ruggi ruggi deleted the feat/reparent-out-of-grid branch August 27, 2024 14:43
@ruggi ruggi mentioned this pull request Aug 28, 2024
liady pushed a commit that referenced this pull request Dec 13, 2024
**Problem:**

It's currently not possible to reparent out of a grid.

**Fix:**

Allow reparenting out of a grid while holding `cmd`, like all other
reparenting scenarios.


https://github.com/user-attachments/assets/df75b0ee-5098-4cba-b66c-507697cf03c0

**Notes:**
The grid rearrange strategy now needs to act as a sort of meta strat,
because 1) it needs a custom mouse drag handling (due to the grid
placeholder controls) and 2) cells don't have positioning props so
absolute reparenting needs some massaging in order to work

Fixes #6263
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.

reparent out of grid
5 participants