-
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 slider number control performance (#6374)
**Problem:** When using the slider in the SliderNumber controls (such as the PromiseCard's BorderRadius in my screenshot) in the component inspector section, the displayed number updates unbearably slowly. <img width="653" alt="image" src="https://github.com/user-attachments/assets/159bac67-2bef-4e4f-bf5e-d5fcfc704687"> The reason is that the slider and number are actually two separate controls, and the number control only gets its state updated in low priority mode once the interaction is finished. **Fix:** Use a shared local state for the value we immediately set while using the slider. **Commit Details:** - Use `usePropControlledStateV2` as shared local state for the transient updates **Bonus mini fixes:** - wrap RemixNavigationBar in LowPriorityState - speeding up Tooltip / tippy **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Preview mode
- Loading branch information
1 parent
c7d1524
commit 043570d
Showing
4 changed files
with
154 additions
and
144 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
Oops, something went wrong.