-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: LEAP-1896: Add scrollbar support to Visualizer #7165
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
Introduced a scroll filler element to improve handling of browser scroll size inconsistencies in the Visualizer. Updated relevant methods and styles to adjust layout dynamically based on the calculated scroll size. Added safeguards to mouse events.
003d550
to
046fb9c
Compare
Renamed `BROWSER_SCROLL_SIZE` to `BROWSER_SCROLLBAR_WIDTH` to provide a clearer description of its purpose. Updated related references and comments to reflect this change, ensuring consistency and maintaining accurate documentation.
162fe3a
to
f315f8b
Compare
Refactored scrollbar logic into a new `initScrollBar` method for better clarity and functionality. Added `scrollbarGutter: stable` for potential consistent scrollbar behavior across browsers.
Updated pixel color comparison coordinates in audio region tests to ensure accuracy and consistency. Added a getter to check the readiness of objects in the model and updated `isReady` logic in test helpers for smoother synchronization.
Added a short wait after verifying the loading bar's absence to ensure the AudioView has completely rendered. This change addresses potential flakiness in tests caused by premature assertions.
/git merge
|
It looks like it was not the problem for tests.
/git merge develop
|
/git merge
|
/git merge
|
Replaced redundant full redraw with a targeted cursor update. Added `redrawCursor` method in Visualizer for efficient cursor rendering, enhancing performance and reducing unnecessary visual updates.
Previously, `onReady` was called without considering the `isDrawing` state, which could lead to premature execution. Introduced `checkReady` to delay readiness until drawing completes, ensuring proper timing and avoiding potential issues.
Reordered method calls in the Visualizer update loop to ensure proper rendering. Moved `updateScrollFiller` and `setScrollLeft` to prevent visual inconsistencies. This resolves timing issues when updating the cursor position and timeline.
169a15e
to
b6067dc
Compare
/git merge develop
|
Introduced a scroll filler element to improve handling of browser scroll size inconsistencies in the Visualizer. Updated relevant methods and styles to adjust the layout dynamically based on the calculated scroll size. Added safeguards to mouse events.

This pull request introduces several enhancements and fixes to the
Visualizer
andWaveform
components, as well as some updates to the testing helpers. The most significant changes include the addition of a scrollbar, improvements to theVisualizer
's scroll handling, and updates to ensure theAudioUltra
's readiness state.Enhancements to Visualizer and Waveform:
BROWSER_SCROLLBAR_WIDTH
constant for dynamic scrollbar width calculation inUtils.ts
.scrollFiller
element andinitScrollBar
method to manage scrollable area size inVisualizer.ts
. [1] [2]setScrollLeft
and_setScrollLeft
methods to handle scroll position updates inVisualizer.ts
.redrawCursor
method to improve synced cursor rendering inVisualizer.ts
.centerToCurrentTime
method to usesetScrollLeft
to keep the scrollbar up to date.Improvements to readiness and event handling:
checkReady
method to ensureWaveform
readiness state inmodel.js
. (There were some issues capturing the final drawing state after the audio finished loading, especially in "view all" mode and tests.)syncCursor
method to useredrawCursor
for cursor updates inWaveform.ts
. (to avoid redrawing all layers)isDrawing
getter toWaveform
for checking drawing state inWaveform.ts
.Testing helpers updates:
waitForObjectsReady
call inisReady
method to ensure readiness inAudioView.ts
. [1] [2]