Skip to content

Conversation

@xiaoliyooo
Copy link
Collaborator

@xiaoliyooo xiaoliyooo commented Nov 1, 2025

Short description

Resolves #
fix #3767
fix #4238

Implementation details

How to test it

Screenshots

Checklist

  • This PR is covered by e2e tests
  • It introduces no breaking API changes

@xiaoliyooo xiaoliyooo requested a review from katspaugh November 2, 2025 01:33
Copy link
Owner

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again! 👍

@katspaugh katspaugh requested a review from Copilot November 2, 2025 21:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where the scroll position could remain non-zero when the waveform becomes non-scrollable (e.g., after zooming out). The change ensures that when a waveform is not scrollable, any lingering scroll position is reset to 0 during re-render.

  • Adds logic in reRender() to reset scroll position to 0 when content is not scrollable
  • Adds test coverage for the new behavior when zooming to non-scrollable state
  • Updates existing scroll position test to explicitly set zoom level for scrollable state

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/renderer.ts Adds condition to reset scrollLeft to 0 when waveform is not scrollable
src/tests/renderer.test.ts Adds test for non-scrollable scroll reset and updates existing test to explicitly zoom

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TrevorHinesley
Copy link

TrevorHinesley commented Nov 10, 2025

Just FYI, this does not fix #4238. If the waveform is zoomed in and scrolled to the right, then when you zoom out partially (but not all the way zoomed out), the waveform still disappears. I pulled it down and tested.

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.

Waveform width not updated correctly when zooming with Hover plugin enabled Hover plugin conflicts with Zoom, causing blank waveform

3 participants