HumanSignal / label-studio-frontend

Data labeling react app that is backend agnostic and can be embedded into your applications — distributed as an NPM package
https://labelstud.io/
Apache License 2.0
419 stars 316 forks source link

fix: OPTIC-354: Comment draft preserved between annotations #1652

Closed Travis1282 closed 9 months ago

Travis1282 commented 9 months ago

Currently when user starts replying on one comment, and than switch to another annotation, comment entered (but not submitted) on the first annotation is not removed from the comment filed, and can be accidentally sent. This fix persists drafts between annotations on a task by putting unsubmitted draft comments in a map using annotation id as a key for each draft comment. OPTIC-354

codecov-commenter commented 9 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (88ba15c) 68.27% compared to head (4b5a30c) 68.28%. Report is 6 commits behind head on master.

Files Patch % Lines
src/components/Comments/CommentForm.tsx 0.00% 0 Missing and 1 partial :warning:
src/stores/Comment/CommentStore.js 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1652 +/- ## ======================================= Coverage 68.27% 68.28% ======================================= Files 443 443 Lines 28690 28690 Branches 7633 7630 -3 ======================================= + Hits 19589 19591 +2 + Misses 7849 7846 -3 - Partials 1252 1253 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.