Skip to content
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-1440: Allow to attach a region to a new comment #6400

Merged
merged 26 commits into from
Sep 24, 2024

Conversation

Gondragos
Copy link
Collaborator

@Gondragos Gondragos commented Sep 18, 2024

This PR provides an ability to link a new comment to a region.

Other changes:

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

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?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

(check all that apply)

  • e2e
  • integration
  • unit

Which logical domain(s) does this change affect?

NewComment

Gondragos and others added 12 commits September 17, 2024 15:12
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]>
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.
@Gondragos Gondragos changed the title feat: LEAP-1469: Allow to attach a region to a new comment feat: LEAP-1469: Allow to attach a region to a new comment [WIP] Sep 18, 2024
Base automatically changed from fb-leap-1469/linking-modes to develop September 19, 2024 11:19
@github-actions github-actions bot added the feat label Sep 19, 2024
@Gondragos
Copy link
Collaborator Author

Gondragos commented Sep 19, 2024

/git merge develop

Workflow run
Successfully merged: create mode 100644 web/libs/editor/tests/integration/e2e/control_tags/classification/textarea.cy.ts

Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 78c4ba6
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/66ed92679a2c930008c9a675

Copy link

netlify bot commented Sep 19, 2024

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

Name Link
🔨 Latest commit 78c4ba6
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/66ed92676e87f2000873a1a6

@Gondragos Gondragos changed the title feat: LEAP-1469: Allow to attach a region to a new comment [WIP] feat: LEAP-1469: Allow to attach a region to a new comment Sep 19, 2024
@Gondragos Gondragos changed the title feat: LEAP-1469: Allow to attach a region to a new comment feat: LEAP-1440: Allow to attach a region to a new comment Sep 20, 2024
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.

Really cool, overall a nice implementation and very interesting feature overall 👏

@Gondragos Gondragos merged commit 4ff9df5 into develop Sep 24, 2024
35 checks passed
@Gondragos Gondragos deleted the fb-leap-1440/link-new-comment branch September 24, 2024 13:45
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.

4 participants