Skip to content

Audio workspace: change cursor and hover element in draw region mode - #11136

Open
lexiv0re wants to merge 6 commits into
developfrom
asz/draw-mode-cursor
Open

Audio workspace: change cursor and hover element in draw region mode#11136
lexiv0re wants to merge 6 commits into
developfrom
asz/draw-mode-cursor

Conversation

@lexiv0re

@lexiv0re lexiv0re commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Motivation and context

When in Draw mode nothing shows it besides the left control bar button state.

This PR changes the Draw mode cursor to text. It's consistent with some other tools interval creation.
Also, changes the hover element vertical guide color to red. It's consistent with red crosshair displayed in 2D in Draw mode.

With the hover vertical guide highlighted in red it became more apparent that the standard WaveSurfer region creation handling has some issues:

  1. End of region being created was a few px rightward the cursor position resulting in the new region to be noticeably larger than displayed by the hovered timestamp.
  2. Moving mouse out of the waveform during creation and then back in resulted in huge gap between the region's border and the cursor
  3. Scrolling during drawing resulted in unpredictable offset between the cursor and the region's end sometimes even resetting the region's width completely.

So these changes additionally fix all the aforementioned issues by taking over the region creation logic.

How has this been tested?

Tested manually.
Adjusted e2e tests.

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@lexiv0re
lexiv0re requested a review from bsekachev as a code owner September 2, 2026 12:48
@lexiv0re
lexiv0re requested a review from nmanovic as a code owner September 2, 2026 12:52
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.45865% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...n-page/audio-workspace/hooks/use-region-editing.ts 83.92% 18 Missing ⚠️
cvat-ui/src/actions/settings-actions.ts 0.00% 2 Missing ⚠️
cvat-ui/src/reducers/settings-reducer.ts 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant