-
Notifications
You must be signed in to change notification settings - Fork 174
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
Grid Element Direct Lookup Ordered Correctly. #6667
Merged
Merged
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
- Moved a lot of common types and functions used when obtaining values from elements for grids into `grid-measurements.tsx`. - Added `getGridElementMeasurementHelperData` to retrieve the necessary details for a grid element, along with some supporting functions. - Extracted out a `getGlobalFrame` function for the common lookup used. - Changed some test ID values in two components as they created the same ones. - `PaddingResizeControl` set to the `bottom` priority so that it doesn't end up on top of the track resizing controls. - `GridControl` now gets the cell dimensions directly from the grid element. - `GridElementContainingBlock` gets the grid child dimensions directly. - Added `HelperControlsStateContext` and made the connected change to `StoreName`. - Added `helperControlsStore` to `Editor`. - Added contexts for the helper store to `EditorRoot` and `HotRoot`. - Wrapped the contents of `GridElementContainingBlocks` and `GridMeasurementHelpers` with the new helper store context. - Added calls to update the helper store in the regular and test dispatch flows.
#15257 Bundle Size — 58.11MiB (~+0.01%).107c6d3(current) vs d1d46c1 master#15256(baseline) Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch fix/grid-element-direct-lookup Project dashboard Generated by RelativeCI Documentation Report issue |
ruggi
approved these changes
Nov 20, 2024
balazsbajorics
approved these changes
Nov 22, 2024
liady
pushed a commit
that referenced
this pull request
Dec 13, 2024
- Moved a lot of common types and functions used when obtaining values from elements for grids into `grid-measurements.tsx`. - Added `getGridElementMeasurementHelperData` to retrieve the necessary details for a grid element, along with some supporting functions. - Extracted out a `getGlobalFrame` function for the common lookup used. - Changed some test ID values in two components as they created the same ones. - `PaddingResizeControl` set to the `bottom` priority so that it doesn't end up on top of the track resizing controls. - `GridControl` now gets the cell dimensions directly from the grid element. - `GridElementContainingBlock` gets the grid child dimensions directly. - Added `HelperControlsStateContext` and made the connected change to `StoreName`. - Added `helperControlsStore` to `Editor`. - Added contexts for the helper store to `EditorRoot` and `HotRoot`. - Wrapped the contents of `GridElementContainingBlocks` and `GridMeasurementHelpers` with the new helper store context. - Added calls to update the helper store in the regular and test dispatch flows.
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:
Grid children should have their properties and dimensions retrieved directly the way we've done for grids.
Fix:
Some additional supporting functions similar to those implemented for grids were implemented for the children of grids. Those were implemented into the controls that still referred to the metadata for the dimensions and grid properties of those elements.
In the process of testing the above work, it was discovered that the flow of data wasn't quite what was expected. With the DOM sampler running before the helper controls were re-rendered, which resulted in some values suffering from the 1-frame behind problem. To solve that an additional store was added just for the helper controls so that now the following ordering is observed:
Commit Details:
grid-measurements.tsx
.getGridElementMeasurementHelperData
to retrieve the necessary details for a grid element, along with some supporting functions.getGlobalFrame
function for the common lookup used.PaddingResizeControl
set to thebottom
priority so that it doesn't end up on top of the track resizing controls.GridControl
now gets the cell dimensions directly from the grid element.GridElementContainingBlock
gets the grid child dimensions directly.HelperControlsStateContext
and made the connected change toStoreName
.helperControlsStore
toEditor
.EditorRoot
andHotRoot
.GridElementContainingBlocks
andGridMeasurementHelpers
with the new helper store context.Manual Tests:
I hereby swear that: