Skip to content

Conversation

@hlomzik
Copy link
Collaborator

@hlomzik hlomzik commented Mar 4, 2025

Two new settings:

  • Toggle region looping when playing; default value is changed to false to not annoy users.
  • Toggle auto-play of new segments (unlabeled regions); default stays true.

AudioUltra view.tsx was changed to move provider with settings higher so they can be used by both Audio and Controls.
Settings are stored in localStorage between sessions.

Before
Screenshot 2025-03-06 at 14 12 57
After
Screenshot 2025-03-06 at 14 09 21

Improved styles for audio controls:

  • uniform font size for all controls
  • increase modal width to fit new settings
  • adjust paddings for better apearance
  • use our common tooltips for info icon

Fixed styles and types for uikit's toggle and label:

  • proper ref typing
  • fix issues
  • remove font-size from a wrong place - it was overriding sizing params

Added usePersistentState and usePersistentJSONState hooks to core lib. Added tests for them.

Default value is changed to false to not annoy users.
In order to do so AudioUltra view was changed to move provider with settings higher.
@github-actions github-actions bot added the feat label Mar 4, 2025
@netlify
Copy link

netlify bot commented Mar 4, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 926eb35
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/67d2c058c7a7710008a95131

@netlify
Copy link

netlify bot commented Mar 4, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 926eb35
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/67d2c0585374a00008d3d257

@hlomzik hlomzik changed the title feat: LEAP-1893: Add setting to toggle region looping feat: LEAP-1893: [WIP] Add setting to toggle region looping Mar 5, 2025
hlomzik added 4 commits March 5, 2025 16:10
Previously if it was after the region or just at the end of it,
the cursor was moved to the end of the region,
which stops playing if looping is disabled.
Now it's always moved to the beginning of the region.
- uniform font size for all controls
- increase modal width to fit new settings
- adjust paddings for better apearance
- use our common tooltips for info icon
- proper ref typing
- fix issues
- remove font-size from a wrong place - it was overriding sizing params
@hlomzik hlomzik changed the title feat: LEAP-1893: [WIP] Add setting to toggle region looping feat: LEAP-1893: LEAP-1900: Add setting to toggle region looping and autoplay Mar 6, 2025
@hlomzik
Copy link
Collaborator Author

hlomzik commented Mar 7, 2025

/git merge

Workflow run
Successfully merged: create mode 100644 web/tsconfig.json

@hlomzik
Copy link
Collaborator Author

hlomzik commented Mar 10, 2025

/git merge

Workflow run
Successfully merged: create mode 100644 web/apps/labelstudio/src/utils/query-client.ts

@hlomzik hlomzik requested review from bmartel and nass600 March 10, 2025 14:44
@Gondragos
Copy link
Contributor

Excellent improvements! And it's great that the hook has been moved to the core library, and now with tests. This was all sorely lacking. I only have doubts about one setting, which is now also persistent, but perhaps that was unnecessary for it.

@MihajloHoma
Copy link
Contributor

MihajloHoma commented Mar 11, 2025

/git merge

Workflow run
Successfully merged: create mode 100644 web/libs/ui/src/lib/enterprise-badge/enterprise-badge.tsx

@MihajloHoma
Copy link
Contributor

MihajloHoma commented Mar 11, 2025

/fm sync

Workflow run

@nikitabelonogov
Copy link
Member

nikitabelonogov commented Mar 11, 2025

/fm sync

Workflow run

@hlomzik
Copy link
Collaborator Author

hlomzik commented Mar 11, 2025

/git merge

Workflow run
Successfully merged: Already up to date.

@MihajloHoma
Copy link
Contributor

MihajloHoma commented Mar 12, 2025

/git merge

Workflow run
Successfully merged: delete mode 100644 label_studio/templates/401.html

@MihajloHoma
Copy link
Contributor

MihajloHoma commented Mar 12, 2025

/fm sync

Workflow run

robot-ci-heartex and others added 2 commits March 12, 2025 08:25
It happens in a lot of cases, because playhead could be moved to the end of the region
and in this case `updateLoop()` pauses the audio if looping is disabled.
So we have to explicitly update the current time to the start of the region.
@MihajloHoma
Copy link
Contributor

MihajloHoma commented Mar 13, 2025

/git merge

Workflow run
Successfully merged: create mode 100644 label_studio/projects/tests/test_project_sample_task.py

@MihajloHoma
Copy link
Contributor

MihajloHoma commented Mar 13, 2025

/fm sync

Workflow run

@hlomzik hlomzik merged commit 2b7f0a4 into develop Mar 13, 2025
34 checks passed
@Gondragos Gondragos deleted the fb-leap-1893/audio-regions-settings branch March 13, 2025 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants