label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

feat: LEAP-1441: Allow to connect classifications to comments

Open hlomzik opened this issue 1 year ago • 3 comments

Modify comments to allow to attach results. This includes global classifications like Choices and TextArea + per-region results connected to a region.

Code

Technically this adds controlName to Anchor to distinguish regions from results. Bboxes are created over the tag defined by this controlName. Comment can be attached to existing result only, so if tag has no value added to it, it can't be attached.

UI

In linking mode there is a highlight around a tag holding a result, so user can select it to attach the result. Any change to result is reflected in a comment. If that's the per-region result it will be styled as a region and will display region index. Comment icons are added directly to a result. results with comments

PR fulfills these requirements

  • [ ] 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.)
  • [x] 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)
  • [x] Frontend

Does this change affect performance?

It's iterating over all the results in linking mode, that should be checked.

Does this change affect security?

nope

What feature flags were used to cover this change?

All this is hidden behind 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)
  • [x] No
  • [ ] Not sure (briefly explain the situation below)

What level of testing was included in the change?

  • [ ] e2e
  • [ ] integration
  • [ ] unit

hlomzik avatar Oct 07 '24 18:10 hlomzik

/git merge

Workflow run Successfully merged: rename web/libs/{storybook => ui}/tsconfig.storybook.json (100%)

hlomzik avatar Oct 08 '24 11:10 hlomzik

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

Name Link
Latest commit 44c1ce41a6898189e19518dbba40f20d15fc0a7f
Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/67069524b5974c00082f6b60
Deploy Preview https://deploy-preview-6486--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.

netlify[bot] avatar Oct 08 '24 14:10 netlify[bot]

Deploy Preview for heartex-docs ready!

Name Link
Latest commit 44c1ce41a6898189e19518dbba40f20d15fc0a7f
Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/67069524cd44ea0008718b5d
Deploy Preview https://deploy-preview-6486--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.

netlify[bot] avatar Oct 08 '24 14:10 netlify[bot]