-
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.
Fix scrubbing performance of FrameUpdatingLayoutControl (#6375)
**Problem:** When using the left label (such as **L**) to scrub a FrameUpdatingLayoutControl, the performance was bad. <img width="282" alt="image" src="https://github.com/user-attachments/assets/9c44718d-a44d-41cc-845d-993ba515bdf9"> Turns out the problem is simply that the control was never using the transient mode, for each scrub update it would fire a non-transient action, rerendering the entire canvas, **creating a new undo step!!!** **Fix:** Make the control aware of transient updates. **Commit Details:** - `executeFirstApplicableStrategy` takes an array of elementsToRerender, if it's a specific array of element paths, it automatically switches to dispatching Transient Actions - `NumberInput` now sets the transient flag for all onSubmit callbacks when scrubbed - `FrameUpdatingLayoutControl`'s onSubmitValue takes the transient parameter and feeds it to updateFrame - `updateFrame` calls `executeFirstApplicableStrategy` with the properly set `elementsToRerender` array **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [ ] I could navigate to various routes in Preview mode
- Loading branch information
1 parent
b1d8588
commit 1697de8
Showing
4 changed files
with
103 additions
and
57 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