-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: LEAP-1439: Display link in existing comment and allow linking #6404
Conversation
Introduce `CommentMode` and `RelationMode` to handle linking annotations with regions. Also, refactor parts of the code to unify the method of linking actions under `LinkingModes` and replace deprecated `relationMode` checks.
Moved the `comment` and `firstRegion` variables to volatile state within the MobX-state-tree models for `CommentMode` and `RelationMode`. This change provides access to payload information of modes in case we need it.
Co-authored-by: hlomzik <[email protected]>
Co-authored-by: hlomzik <[email protected]>
Co-authored-by: hlomzik <[email protected]>
Updated all instances of `Constants.RELATION_MODE_CURSOR` to `Constants.LINKING_MODE_CURSOR` across various files. This ensures consistency in naming and improves code readability for linking mode features.
Refactored comments feature to support per-field comments through feature flags, added linking functionality between comments and regions, and updated UI with new icons and styles.
Reorganize the comment form components by separating old and new versions. Adjust CSS class names to avoid conflicts and import paths for clarity.
web/libs/editor/src/components/Comments/Comment/CommentItem.tsx
Outdated
Show resolved
Hide resolved
Replace `displayRegionLabel` with `RegionLabel` component in OutlinerTree and LinkState components.
/git merge fb-leap-1440/link-new-comment
|
Co-authored-by: bmartel <[email protected]>
Co-authored-by: bmartel <[email protected]>
Co-authored-by: bmartel <[email protected]>
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.
looks good over all - i have a question and a minor nit-pick other wise ✅
Refactor the feature flag checks by introducing the `isPerFieldComments` variable.
/git merge develop
|
✅ Deploy Preview for label-studio-docs-new-theme ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for heartex-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Improve the comment update process by incorporating `snakeizeKeys` for `props`. Properly handle update error state by setting `isUpdating` to false when errors occur. Simplify `regionRef` processing by removing unnecessary `snakeizeKeys` calls on upper level.
/git merge develop
|
Updated CommentForm to use commentInProgress instead of currentComment for improved clarity. Also, included annotationStore in CommentBase creation to ensure consistent data access.
…abs/label-studio into fb-leap-1439/link-comment
web/libs/editor/src/components/Comments/Comment/CommentsList.tsx
Outdated
Show resolved
Hide resolved
web/libs/editor/src/components/Comments/Comment/CommentItem.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: hlomzik <[email protected]>
…abs/label-studio into fb-leap-1439/link-comment
/git merge develop
|
This PR provides an ability to link an existing comment to a region and display linked region.
Other changes:
PR fulfills these requirements
[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made
ex.fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
Change has impacts in these area(s)
Describe the reason for change
It's a part of implementing linking comment to region functionality.
What feature flags were used to cover this change?
fflag_feat_all_leap_1430_per_field_comments_100924_short
Does this PR introduce a breaking change?
What level of testing was included in the change?
(check all that apply)
Which logical domain(s) does this change affect?
Comments