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-1439: Display link in existing comment and allow linking #6404

Merged
merged 46 commits into from
Sep 26, 2024

Conversation

Gondragos
Copy link
Collaborator

@Gondragos Gondragos commented Sep 18, 2024

This PR provides an ability to link an existing comment to a region and display linked 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?

  • 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?

Comments

Gondragos and others added 15 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
Copy link
Collaborator Author

Gondragos commented Sep 19, 2024

/git merge fb-leap-1440/link-new-comment

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

Copy link
Contributor

@yyassi-heartex yyassi-heartex left a 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.
Base automatically changed from fb-leap-1440/link-new-comment to develop September 24, 2024 13:45
@github-actions github-actions bot added the feat label Sep 24, 2024
@Gondragos
Copy link
Collaborator Author

Gondragos commented Sep 24, 2024

/git merge develop

Workflow run
Successfully merged: 23 files changed, 702 insertions(+), 71 deletions(-)

Copy link

netlify bot commented Sep 24, 2024

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

Name Link
🔨 Latest commit 47555d6
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/66f4aae3cfcfb700088b5486
😎 Deploy Preview https://deploy-preview-6404--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 Sep 24, 2024

Deploy Preview for heartex-docs ready!

Name Link
🔨 Latest commit 47555d6
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/66f4aae3d8f1d5000856f2fa
😎 Deploy Preview https://deploy-preview-6404--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 feat: LEAP-1439: Display link in existing comment and allow linking [WIP] feat: LEAP-1439: Display link in existing comment and allow linking Sep 24, 2024
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.
@Gondragos
Copy link
Collaborator Author

Gondragos commented Sep 25, 2024

/git merge develop

Workflow run
Successfully merged: create mode 100644 web/dist/apps/labelstudio/link-to.539fa385668368f5e3c242aa876ae6d3.svg

Gondragos and others added 3 commits September 25, 2024 12:46
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
@Gondragos
Copy link
Collaborator Author

Gondragos commented Sep 26, 2024

/git merge develop

Workflow run
Successfully merged: create mode 100644 web/libs/editor/src/regions/TextAreaRegion/TextAreaRegion.scss

@Gondragos Gondragos enabled auto-merge (squash) September 26, 2024 01:47
@Gondragos Gondragos merged commit c46ff7e into develop Sep 26, 2024
33 checks passed
@Gondragos Gondragos deleted the fb-leap-1439/link-comment branch September 26, 2024 02:05
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