-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GridMeasurementHelper component to continuously measure grid cells (#…
…6517) **Problem:** When you reparent from a grid to another grid, for a single frame the element blinks at the same cell position as it was in the original grid: https://screenshot.click/09-31-10wrd-ysw94.mp4 **Root cause:** As you hover over the target grid, the grid-reparent-strategy is selected. It triggers a showGridControl command, so the grid control is shown and the cells can be measured. However, it won't be able to position to the real target cell in this frame yet, because the control is not enabled yet, so we don't have the cell bounds in the metadata. **Fix:** Instead of using grid controls to measure let show permanent grid measurement helpers so grids can always be measured. **Commit Details:** (< vv pls delete this section if's not relevant) - Added memoized function `getAllGrids` which returns all the grids from the metadata - Added `GridMeasurementHelper` component which renders a grid with placeholder divs in its cells (similarly to `GridControl`, but much-much simpler) - Rendering `GridMeasurementHelper` for all grids - Use rendered grid measurement helpers in dom-walker to measure the size of grid cell bounds - Remove all the hacks (most notably `getMetadataWithGridCellBounds`) which made it possible to use latestMetadata in interaction when startingMetadata did not include grid cell bounds. This is not needed anymore, because the grid cells are always measured using the always-on `GridMeasurementHelper` components **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
- Loading branch information
Showing
11 changed files
with
249 additions
and
146 deletions.
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.