-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix: LEAP-1947: Fix interactive view all FF in image tag case #7387
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
base: develop
Are you sure you want to change the base?
Conversation
- fix interactive view all working with MIG approach - fix the way Tools Manager works in case of annotation has it's own independent tags models tree
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
✅ Deploy Preview for heartex-docs canceled.
|
/git merge
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issues with interactive view rendering when working with image tags by integrating the FF_DEV_3391 feature flag. It also updates various modules to adjust tool manager behavior and annotation IDs for image-related entities.
- Enabled the FF_DEV_3391 feature flag in multiple files to conditionally change the rendering and tool initialization logic.
- Updates include modifications to ToolsManager, Tool mixins, and Annotation update functions to ensure IDs and tool references are handled correctly.
- Adjusted the Tree rendering logic to provide a fallback for image region rendering.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
web/libs/editor/src/tools/Manager.js | Added a new getter “root” intended to expose the annotation store’s root. |
web/libs/editor/src/tags/object/Image/Image.js | Enhanced imageEntities ID generation and introduced a feature flag check in afterAttach. |
web/libs/editor/src/stores/Annotation/Annotation.js | Extended updateIds to include imageEntities for consistency. |
web/libs/editor/src/mixins/ToolManagerMixin.js | Added feature flag check in afterAttach to skip tool initialization when not applicable. |
web/libs/editor/src/mixins/Tool.js | Updated obj and control getters to use the feature flag for annotation selection. |
web/libs/editor/src/core/Tree.tsx | Modified rendering to use a fallback for image regions via a feature flag. |
Files not reviewed (1)
- web/libs/editor/src/core/feature-flags/flags.json: Language not supported
Comments suppressed due to low confidence (1)
web/libs/editor/src/tools/Manager.js:47
- The getter 'root' references an undefined variable 'root'. Consider using a properly defined reference, such as getRoot(this), or otherwise ensure that the root context is correctly passed.
return root;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add more comments please around views — what and how are you trying to retrieve.
PR itself seems good, just would be better to fully understand what's going on.
.volatile((self) => { | ||
return { | ||
manager: null, | ||
}; | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we usually use simpler version
.volatile((self) => { | |
return { | |
manager: null, | |
}; | |
}) | |
.volatile((self) => ({ | |
manager: null, | |
})) |
This pull request introduces changes to enable and integrate the
FF_DEV_3391
feature flag, which enhances the handling of interactive views and image regions in the annotation tool.Feature Flag Integration:
FF_DEV_3391
feature flag inflags.json
to activate the new interactive view functionality.renderItem
inTree.tsx
to include a fallback mechanism (|| el
) for rendering image regions when the feature flag is active.Tool and Manager Enhancements:
ToolMixin
to dynamically adjust theobj
andcontrol
getters based on the selected annotation. [1] [2]root
getter inToolsManager
to provide access to the annotation store's root.Annotation and Image Model Updates:
Annotation.js
to includeimageEntities
in theupdateIds
function for better handling of image-related annotations.Image.js
to: