-
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(classifier): advance subjects immediately on Done #6699
base: master
Are you sure you want to change the base?
Conversation
cc3763c
to
aa583ac
Compare
if (!doneAndTalk) { | ||
// advance to the next subject immediately. | ||
self.loadingState = asyncStates.posting | ||
yield self.classificationQueue.add(classification) | ||
} else { | ||
// advance to the next subject once the classification has been submitted. | ||
yield self.classificationQueue.add(classification) | ||
self.loadingState = asyncStates.posting | ||
} |
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.
This patch works because the classifier's root store advances the subject queue when the classification loading state changes to 'posting' (which isn't immediately obvious, to be honest.)
front-end-monorepo/packages/lib-classifier/src/store/RootStore.js
Lines 72 to 78 in 9c6bfa8
function _onPatch(patch) { | |
// TODO: why are we doing this rather than observe classifications.loadingState for changes? | |
const { path, value } = patch | |
if (path === '/classifications/loadingState' && value === 'posting') { | |
self.subjects.advance() | |
} | |
} |
a81306d
to
3916eee
Compare
Pass a `doneAndTalk` flag to `completeClassification` when Done & Talk is clicked. Advance the subject queue immediately if it's false, otherwise wait until the classification is saved before advancing the subject and going to Talk.
3916eee
to
ec08934
Compare
Pass a
doneAndTalk
flag tocompleteClassification
when Done or Done & Talk is clicked. Advance the subject queue immediately if it's false, otherwise wait until the classification is saved before advancing the subject and going to Talk.Please request review from
@zooniverse/frontend
team or an individual member of that team.Package
Linked Issue and/or Talk Post
How to Review
You can test this out by classifying on Daily Minor Planet:
https://localhost:8080/?project=fulsdavid/the-daily-minor-planet&env=production
After pressing Done, the next subject will load while your classification saves in the background (like PFE.)
After pressing Done & Talk, your classification is saved before the page unloads and goes to Talk.
Checklist
PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.
General
yarn panic && yarn bootstrap
ordocker-compose up --build
and FEM works as expectedGeneral UX
Example Staging Project: i-fancy-cats
Bug Fix