-
Notifications
You must be signed in to change notification settings - Fork 257
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 bug with next button in review interface #1358
Fix bug with next button in review interface #1358
Conversation
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 are a couple of problems with this change that I think result from the way the Next button is implemented:
This implementation works, but can have dismal performance. When looking at a list of submissions that contains thousands of entries, all of those entries will needed to be loaded (the call to scope.index
) to get the index of the current submission being looked at. Right now, that'll mean instantiating thousands of ActiveRecord objects just to get the index of one entry.
There might be ways to reduce memory consumption there, but fundamentally, the fact that we need to do things like this is just weird.
I think we should inspect the original requirement for the Next button. Quoting from the issue:
This button was meant to work primarily as a way to jump to the next submission when reviewing student submissions pending review... as a way for coaches to quickly jump to the next submission to look at.
However, this button is present in the UI, regardless of whether the Pending filter is applied, and because it's called Next, its behaviour is confusing.
@pupilfirst/designers Note how the issue text focuses on jumping to the next pending submission. I think we can side-step the entire query performance issue by making a Next button appear only after a reviewer has reviewed a submission. i.e., Right after a submission is reviewed, show a button in the UI (in the area where the review was done) to Show next submission awaiting review.
This button can then pick the first (any) submission that is pending review. It might make sense to actually pick the oldest submission awaiting review. That way, the original need for this button is satisfied, and we avoid performance complications that this approach raises.
@kaisersakhi There is a UX issue with the current implementation of the "Next" button. To improve the UX, Also, we can improve the button's copy to 'Show next submission awaiting review' as suggested by @harigopal. ![]() |
…ub.com:kaisersakhi/pupilfirst into issues/931/bug-in-review-interface-next-button
app/frontend/courses/review/components/CoursesReview__Editor.res
Outdated
Show resolved
Hide resolved
app/frontend/courses/review/components/CoursesReview__Editor.res
Outdated
Show resolved
Hide resolved
app/frontend/courses/review/components/CoursesReview__Editor.res
Outdated
Show resolved
Hide resolved
app/frontend/courses/review/components/CoursesReview__Editor.res
Outdated
Show resolved
Hide resolved
app/frontend/courses/review/components/CoursesReview__Editor.res
Outdated
Show resolved
Hide resolved
app/frontend/courses/review/components/CoursesReview__Editor.res
Outdated
Show resolved
Hide resolved
app/frontend/courses/review/components/CoursesReview__Editor.res
Outdated
Show resolved
Hide resolved
app/frontend/courses/review/components/CoursesReview__Editor.res
Outdated
Show resolved
Hide resolved
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.
LGTM
Proposed Changes
Fixes #931
CoursesReview__Editor.res
exclude_submission_id
tocurrent_submission_id
@pupilfirst/developers
Merge Checklist
[ ] Check if route, query, or mutation authorization looks correct.Add tests for authorization, if required.[ ] Update developer and product docs, where applicable.[ ] Check if new tables or columns that have been added need to be handled in the following services:Users::DeleteAccountService
Courses::CloneService
Courses::DeleteService
Courses::DemoContentService
Levels::CloneService
Schools::DeleteService
[ ] Check if changes in packaged components have been published tonpm
.[ ] Add development seeds for new tables.[ ] If the updates involve Graph mutations ensure that the files are migrated to the new approach without a mutator.Demo
fix-bug-next-button-review-interface.mov