Skip to content

fix: LEAP-1957: Fix implementation of readonly behavior for controls and audio regions #7412

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

Merged
merged 9 commits into from
Apr 30, 2025

Conversation

Gondragos
Copy link
Collaborator

Reason for change

This update addresses the need to enforce readonly functionality across components, ensuring that the isReadOnly property is respected as intended. Additionally, the features ensure that annotations in "view all" mode remain non-editable, improving the application's integrity.

Solution

  • Implemented isReadOnly checks across Rating controls, Taxonomy, and Audio regions, restricting user interactions appropriately.
  • Updated tests to verify readonly behavior for these components.
  • Introduced a helper for accessing the "view all" button in the Toolbar component.

Testing

  • End-to-end and integration tests: Covered scenarios for ensuring all annotations in "view all" mode are locked from editing and interactions.

Risks

No significant risks have been identified, as this change enforces UI constraints without altering the core application logic.

Introduced regression integration and e2e tests to ensure annotations in "view all" mode are non-editable. Covered use cases for Rating, Taxonomy, and Audio regions. Added a new helper for accessing the "view all" button in the ToolBar component.
Ensure that controls respect the `isReadOnly` property across components.
- Enabled `isEditable` for Taxonomy and linked it to disabled prop.
- Updated tests to verify readonly functionality.
- Applied the `isReadOnly` check in AudioRegionModel, Rating control, and associated UI elements to restrict user interactions properly.
Copy link

netlify bot commented Apr 23, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 01b798f
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-storybook/deploys/6811ca60681f2d000849c4f9
😎 Deploy Preview https://deploy-preview-7412--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@Gondragos Gondragos requested a review from hlomzik April 23, 2025 08:55
Copy link

netlify bot commented Apr 23, 2025

Deploy Preview for label-studio-docs-new-theme ready!

Name Link
🔨 Latest commit 01b798f
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/6811ca60046d160008ddc2e4
😎 Deploy Preview https://deploy-preview-7412--label-studio-docs-new-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link

netlify bot commented Apr 23, 2025

Deploy Preview for heartex-docs ready!

Name Link
🔨 Latest commit 01b798f
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/6811ca60f9871f0008a4da33
😎 Deploy Preview https://deploy-preview-7412--heartex-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@Gondragos Gondragos changed the title Fb leap 1957/view all tests fix: LEAP-1957: Fix implementation of readonly behavior for controls and audio regions Apr 23, 2025
@MihajloHoma
Copy link
Contributor

MihajloHoma commented Apr 24, 2025

/fm sync

Workflow run

Refined conditions to handle `updateable` state across multiple
interactions, adding ability to select region without editing it.
- Removed unnecessary `updateable` checks for mouse events where not required.
- Added conditional guardrails for edge dragging and region selection to ensure consistent behavior.
- Simplified and enhanced readability of related conditional statements.
Introduce a new test to validate audio region selection functionality.
- Added `audioPerRegionConfig` to support per-region choices.
- Updated the test spec to verify selection and visibility of per-region choices in the UI.
@Gondragos Gondragos requested review from hlomzik and bmartel April 29, 2025 13:49
Copy link
Contributor

@bmartel bmartel left a comment

Choose a reason for hiding this comment

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

Audio changes look good, not as familiar with the other changes but based on the tests and code also look good!

@Gondragos
Copy link
Collaborator Author

Gondragos commented Apr 30, 2025

/git merge

Workflow run
Successfully merged: delete mode 100644 web/libs/ui/src/tokens/layout.scss

@Gondragos Gondragos merged commit 82b5176 into develop Apr 30, 2025
40 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-LEAP-1957/view-all-tests branch April 30, 2025 15:37
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.

5 participants