We should save draft when user clicks on View All, but we should save it only if there are changes made to annotation.
PR fulfills these requirements
[ ] Tests for the changes have been added/updated
[ ] Docs have been added/updated
[x] 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
Describe the reason for change
Draft is created/updated every time user click on View All, even if that's fresh new task, if there are no changes, if draft was saved a second ago.
What alternative approaches were there?
We could add checks for actual changes to saveDraftImmediatelyWithResults(), but the whole approach should be revisited. So current fix is a quick patch for the actual problem.
Also the main reason for draft not being saved is the check for editable in saveDraft() — at this moment View All is already displayed and all annotations are not editable. Most probably it will be enough just to rewrite this check to check for annotation explicitly.
This change affects (describe how if yes)
[ ] Performance
[ ] Security
[x] UX — toast about "Draft saved" disappeared but it was only introduced a month ago; we'll return it later
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)
We should save draft when user clicks on View All, but we should save it only if there are changes made to annotation.
PR fulfills these requirements
Describe the reason for change
Draft is created/updated every time user click on View All, even if that's fresh new task, if there are no changes, if draft was saved a second ago.
What alternative approaches were there?
We could add checks for actual changes to
saveDraftImmediatelyWithResults()
, but the whole approach should be revisited. So current fix is a quick patch for the actual problem. Also the main reason for draft not being saved is the check foreditable
insaveDraft()
— at this moment View All is already displayed and all annotations are not editable. Most probably it will be enough just to rewrite this check to check for annotation explicitly.This change affects (describe how if yes)
Does this PR introduce a breaking change?
What level of testing was included in the change?