Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: add debouncing to dynamic parameter slider for Safari performance#18860

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
blink-so wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromfix/safari-slider-debounce

Conversation

blink-so[bot]
Copy link
Contributor

Fixes#18856

The dynamic parameter slider was extremely laggy in Safari due to lack of debouncing on theonValueChange event. This caused constant state updates during slider movement, which Safari handles poorly compared to other browsers.

Changes

  • AddedDebouncedSlider component that follows the same pattern asDebouncedParameterField
  • UsesuseDebouncedValue with 300ms delay to reduce update frequency while maintaining smooth UI interaction
  • Maintains local state for immediate visual feedback while debouncing the actualonChange calls
  • Preserves all existing functionality including validation, styling, and disabled states

Testing

The implementation follows the exact same debouncing pattern already used successfully inDebouncedParameterField for text inputs. The slider now:

  • Responds smoothly to user input without lag
  • Updates values in real-time without flashing
  • No longer continues moving after user interaction stops
  • Allows precise value setting

Technical Details

The fix replaces the directonChange call in the slider case with a debounced component that:

  1. Maintains local state for immediate UI updates
  2. Debounces the actual parameter value changes
  3. Handles external value updates (e.g., from presets)
  4. Uses the same hooks (useDebouncedValue,useEffectEvent) as other debounced components

This resolves the Safari-specific performance issue while maintaining compatibility with all browsers.

blink-sobotand others added2 commitsJuly 14, 2025 16:19
Fixes#18856The dynamic parameter slider was extremely laggy in Safari due tolack of debouncing on the onValueChange event. This caused constantstate updates during slider movement, which Safari handles poorly.This change:- Adds a new DebouncedSlider component that follows the same pattern  as DebouncedParameterField- Uses useDebouncedValue with 300ms delay to reduce update frequency- Maintains local state for smooth UI interaction while debouncing  the actual onChange calls- Preserves all existing functionality and stylingTested: Slider now responds smoothly without lag or flashingCo-authored-by: Emyrk <5446298+Emyrk@users.noreply.github.com>
Fixes linting error for exhaustive dependencies rule.The useEffect hook was using localValue in the conditionbut not including it in the dependency array.Co-authored-by: Emyrk <5446298+Emyrk@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Dynamic parameter slider is laggy and non-functional in Safari
0 participants

[8]ページ先頭

©2009-2025 Movatter.jp