-
Notifications
You must be signed in to change notification settings - Fork 168
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
Inserting/reparenting into a grid component #6602
Conversation
#14969 Bundle Size — 58.03MiB (~+0.01%).7962613(current) vs d1d46c1 master#14966(baseline) Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
|
Current #14969 |
Baseline #14966 |
|
---|---|---|
Initial JS | 41.01MiB (~+0.01% ) |
41.01MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 18.06% |
17.95% |
Chunks | 20 |
20 |
Assets | 22 |
22 |
Modules | 4163 |
4163 |
Duplicate Modules | 213 |
213 |
Duplicate Code | 27.31% |
27.31% |
Packages | 477 |
477 |
Duplicate Packages | 70 |
70 |
Bundle size by type 2 changes
1 regression
1 improvement
Current #14969 |
Baseline #14966 |
|
---|---|---|
JS | 58.02MiB (~+0.01% ) |
58.02MiB |
HTML | 7.37KiB (-0.25% ) |
7.39KiB |
Bundle analysis report Branch fix/insertion-into-component Project dashboard
Generated by RelativeCI Documentation Report issue
let gridCellGlobalFrames: GridCellGlobalFrames | null = null | ||
const gridControlElement = document.getElementById(GridMeasurementHelperKey(EP.fromString(path))) | ||
const gridControlElement = (() => { | ||
for (let p of paths) { |
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.
Does this work with nested grids?
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.
Absolutely! These paths are all utopia element paths which render exactly to this html element, so there is no overlap between the paths of different grids.
Problem:
Inserting/reparenting into a grid component doesn't work.
Root cause:
The problem is the following:
Fix:
getPathsOnDomElement
, which lists all the possible utopia element paths connected to this rendered html element. Try to find the measurement helper using these paths (it is enough to use the first one which is found).measureGlobalFramesOfGridCellsFromControl
because it doesn't use the grid control anymore (but the measurement helper).This change fixes all draw-to-insert/click-to-insert/reparent functionalities.
Manual Tests:
I hereby swear that: