-
Notifications
You must be signed in to change notification settings - Fork 30
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 previous marks from caesar render for transcription task #2001
Conversation
…isplaying transcribed lines and the hide marks button.
There's a minor styling bug introduced with this PR. On a drawing task with marks from a previous step, the previous marks show the hand cursor on hover. They can't be selected, so it's only the styling that's broken. |
The transcription project looks good to me. Transcribed lines are visible are visible as per the screenshot above. Should I expect any of the purple and blue lines to turn grey? |
Hide/Show previous marks is broken on a workflow with two drawing steps.
I can reproduce that behaviour on master, so it isn't a blocker here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good to me. There's a couple of places where I thought the tests were hard to understand. There's a styling bug introduced here for previous marks from drawing tasks. I'm not sure if you want to fix that here, or open a separate issue?
The styling bug shouldn't be a blocker for the transcription project beta test.
...Classifier/components/SubjectViewer/components/InteractionLayer/InteractionLayerContainer.js
Show resolved
Hide resolved
...nts/SubjectViewer/components/InteractionLayer/components/PreviousMarks/PreviousMarks.spec.js
Outdated
Show resolved
Hide resolved
...nts/SubjectViewer/components/InteractionLayer/components/PreviousMarks/PreviousMarks.spec.js
Outdated
Show resolved
Hide resolved
...nts/SubjectViewer/components/InteractionLayer/components/PreviousMarks/PreviousMarks.spec.js
Outdated
Show resolved
Hide resolved
...ctViewer/components/InteractionLayer/components/PreviousMarks/PreviousMarksConnector.spec.js
Show resolved
Hide resolved
…ubjectViewer/components/InteractionLayer/components/PreviousMarks/PreviousMarks.spec.js Co-authored-by: Jim O'Donnell <[email protected]>
Not yet, the grey state is the retired state from Caesar. We need more classifications to get them to turn grey. |
{interactionTaskAnnotations.map((annotation) => { | ||
const annotationValuesPerFrame = annotation.value.filter(value => value.frame === frame) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eatyourgreens this is a long-ago PR, but I have a question particularly about this line introduced here, which is still used in production. annotationValuesPerFrame
is intended to filter marks based on the frame
passed to PreviousMarks component. However, Travis and I have found that's not always the case and are unsure how long the following bug has been around ~
On projects with multi-frame subjects and more than one workflow step, previous annotations do not filter correctly when switching between frames. For instance, How Did We Get Here is a transcription project with drawing as the first step and a yes/no as the second step. If I draw marks on all the frames in the first step, then go to the 2nd step, navigating between frames renders marks on only one frame. I think the expected behavior is that previous marks should always render on their respective frames. Any thoughts on how to fix this filter?
(More dicussion here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on that, I would say that previousAnnotations
is working as expected, but the classification isn't being updated correctly when you draw on more than one frame of a subject. classification.annotations
only contains mark IDs for the active frame. I'd expect it to contain the mark IDs for all the transcription lines that I've made.
Lines 107 to 108 in 6b421ed
const markIDs = marks.map((mark) => mark.id) | |
annotation.update([...markIDs, mark.id]) |
Since this bug is in production, and there are projects with subjects that have more than one page, I would definitely double check that classifications are being recorded properly when a volunteer adds lines to more than one page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've suggested a fix for the markIDs
array in #5919.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the bug, by the way. marks
here is filtered by frame before being added to the classification in InteractionLayer
.
Line 92 in 6b421ed
marks={visibleMarksPerFrame} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#5923 is a more robust fix, replacing the manual update with an autorun reaction that runs whenever the task’s marks change.
Please request review from
@zooniverse/frontend
team. If PR is related to design, please request review from@beckyrother
in addition.Package: lib-classifier
Toward #1978, fixes the previous marks render described in this comment: #1978 (comment)
You can test by running the dev classifier with https://localhost:8080/?project=11300&env=production
The previous transcription marks loaded from the caesar reductions are now viewable throughout the workflow tasks and this enables us to answer the question from the second step question task:
The hide previous marks button is always available too:
Compare this to another project with a drawing task (https://localhost:8080/?project=908&workflow=3370), the hide previous marks button is only available on the step with drawing tasks.
Review Checklist
General
Components
Apps
yarn panic && yarn bootstrap
ordocker-compose up --build
and app works as expected?Publishing
Post-merging