-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix: Store all drawn marks in the classification #5919
fix: Store all drawn marks in the classification #5919
Conversation
@kieftrav @goplayoutside3 I don't have permission to request reviews or add labels to Zooniverse PRs, so I'm pinging you to take a look at this. There might be an urgent issue, affecting live transcription projects, where work is being lost. I think it's worth double checking whether classifications are broken for live transcription projects, when you draw on more than one page of a subject. It might be that lines are only being saved for the current, active frame. I'm not 100% certain about that, because the code that serialises a classification (before POSTing it to the API) may actually loop through all drawing tools and marks, and serialise them to the saved classification. From a quick re-read of the code, the saved classifier snapshot might only include mark IDs that were added to the transcription task annotation, so I'm concerned that volunteer work might have been lost. It depends whether front-end-monorepo/packages/lib-classifier/src/store/Classification/Classification.js Lines 22 to 30 in 6b421ed
|
@eatyourgreens @goplayoutside3 - this 1 line does fix the issue. I want to be clear that we are not losing any data upon classification submission. |
Excellent. If this is just a rendering bug, then that's less urgent. |
@eatyourgreens - 100% a rendering bug. I couldn't figure out where |
Drawing task annotations are slightly different from other task annotations. They use front-end-monorepo/packages/lib-classifier/src/plugins/tasks/drawing/models/DrawingAnnotation.js Line 11 in 1be4462
Essentially, a drawing task annotation is an array of mark IDs. A side effect of this is that they're updated differently from other tasks, which hold a direct value rather than a reference. I think this could be automated by having the drawing annotation model observe |
front-end-monorepo/packages/lib-classifier/src/plugins/tasks/drawing/models/DrawingAnnotation.js Line 17 in 6b421ed
Once you have the actual task, you can observe |
29c6f0e
to
2b80be1
Compare
I've opened #5923 with those changes to the drawing annotation models. |
After creating a new mark, add the new mark to the previous annotation value and store this as a new annotation. Should fix a bug raised in this comment: zooniverse#5913 (comment)
2b80be1
to
dbe93b4
Compare
Closing this in favour of #5923. |
After creating a new mark, add the new mark to the previous annotation value and store this as a new annotation. Should fix a bug raised in this comment: #5913 (comment)
You can try this out on How Did We Get Here, in the dev classifier. Draw on both frames of a subject, then check whether the drawn marks persist, in the classification, on the second step of the workflow.
https://local.zooniverse.org:8080/?project=communitiesandcrowds/how-did-we-get-here&env=production
Expected behaviour
When I create a new mark,
classification.annotations
should be updated to include all the marks that I've drawn for the current task.Actual behaviour
When I draw a mark, the new drawing task annotation only contains mark IDs from the active frame. Mark IDs from other frames are silently dropped from the classification.
The marks themselves are still stored on their respective drawing tools, but the references to them are removed from the task annotation.