Closed
Conversation
… are unfinished Add hasIncompleteRegions computed view to Annotation model that checks if any areas have incomplete property set (unclosed polygons/vectors). Use this flag in the BottomBar Controls to disable Submit, Update, and Accept buttons when incomplete regions exist, with appropriate tooltips explaining why the buttons are disabled. Co-authored-by: AndrejOros <AndrejOros@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Add early return guard for hasIncompleteRegions in the annotation:submit hotkey handler, which covers Submit, Update, and Accept actions. Co-authored-by: AndrejOros <AndrejOros@users.noreply.github.com>
❌ Deploy Preview for heartex-docs failed. Why did it fail? →
|
1 similar comment
❌ Deploy Preview for heartex-docs failed. Why did it fail? →
|
✅ Deploy Preview for heartex-docs canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change
Previously, users could submit, update, or accept an annotation even if it contained an unfinished polygon region. This PR disables the "Submit", "Update", and "Fix & Accept" buttons when an annotation has any incomplete polygon regions, preventing premature submission of incomplete work.
Screenshots
No direct UI layout changes. Verification involves observing button disabled states and tooltips.
Rollout strategy
Standard deployment. No feature flags or environment variables are needed.
Testing
Risks
Low risk. The changes are localized to the
Annotationmodel and the active BottomBar UI components. Legacy UI components were explicitly reverted to ensure minimal impact.Reviewer notes
web/libs/editor/src/stores/Annotation/Annotation.js: A new computed viewhasIncompleteRegionswas added. This view iterates overself.areasand checks for theincompleteproperty. OnlyPolygonRegionandVectorRegiondefineincomplete, ensuring other region types do not trigger this logic.web/libs/editor/src/components/BottomBar/Controls.tsx: TheisDisabledlogic for the "Submit" and "Update" buttons (and their dropdown variants) now includesannotation.hasIncompleteRegions. Tooltips are updated accordingly.web/libs/editor/src/components/BottomBar/buttons.tsx: TheAcceptButtoncomponent now checksannotation.hasIncompleteRegionsto determine its disabled state and tooltip.General notes
This fix is intentionally scoped to only the active BottomBar UI and the
Annotationmodel. No changes were made to legacy UI components or other button types (e.g., Skip, Reject) to keep the impact as minimal and targeted as possible.