Skip to content

perf(html): re-render sliders on resize only for edge thumb alignment - #9401

Open
taekop wants to merge 1 commit into
videojs:mainfrom
taekop:perf/slider-resize-center
Open

taekop wants to merge 1 commit into
videojs:mainfrom
taekop:perf/slider-resize-center

Conversation

@taekop

@taekop taekop commented Oct 10, 2026

Copy link
Copy Markdown

Closes #9400

Summary

media-slider, media-time-slider and media-volume-slider called requestUpdate() on every resize. Only thumb-alignment="edge" reads the slider's size, so with the default center alignment each resize re-applied the same attributes and CSS variables.

Changes

  • The resize callback now requests an update only when thumbAlignment is edge.
  • Edge-aligned sliders still re-render on resize, so the behavior from fix(html): thumb edge alignment jump v10#766 is unchanged.
  • Changing thumb-alignment still re-renders through the normal property update.

Testing

  • New test in each slider element suite: a resize does not call requestUpdate() for center and calls it once for edge. The three tests fail without the change.
  • vp test run in packages/html (450 passed), packages/react (584 passed) and packages/core (1474 passed). The 4 menu/tests/module-graph.test.ts failures in html and react also happen on main in my checkout. They come from a space in my local path (%20 in the resolved file path).
  • pnpm typecheck, vp check --no-lint and vp lint on the changed files.

@netlify

netlify Bot commented Oct 10, 2026

Copy link
Copy Markdown

👷 Deploy request for vjs10-site pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit f3c8852

@netlify

netlify Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vjs-registry ready!

Name Link
🔨 Latest commit f3c8852
🔍 Latest deploy log https://app.netlify.com/projects/vjs-registry/deploys/6aca619356e40b0008d3e04f
😎 Deploy Preview https://deploy-preview-9401--vjs-registry.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Sliders Re-render on Every Resize Even When Thumb-Alignment="Center"

1 participant