-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat(Run): Allow teachers to archive runs #1173
feat(Run): Allow teachers to archive runs #1173
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.
I added some comments. Also, should we use "Archive/Unarchive Unit" instead of "Archive/Unarchive Run"? We want teachers to think in "unit", not "run"?
src/app/teacher/teacher-run-list/teacher-run-list.component.html
Outdated
Show resolved
Hide resolved
Ah, yep. Good catch. We should hide them.
We should update the *ngIf to look for any active runs, rather than any runs for the user. We should also add a different notice when viewing the archive and the user has no archived runs (i.e. "You don't have any archived classroom units."). |
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.
It's getting there. As discussed this morning, here are some more changes to make:
-
In both active and archive views, add “scheduled” select-option, and show the option order as follows: All -> None -> Completed -> Running -> Scheduled
-
Change message when there are no active runs to “Hey there! Looks like you don't have any active classroom units.\n\nBrowse the "Unit Library" to find titles to use with your students.” Also remove the count message.
-
Change message when there are no archived runs to “You don’t have any archived classroom units.” Also remove the count message.
-
See minor code comments inline
src/app/teacher/teacher-run-list-item/teacher-run-list-item.component.ts
Outdated
Show resolved
Hide resolved
Slightly change message when there are no runs. #1012
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 added some code suggestions to prevent adding new code duplication issues in the TeacherRunListComponent spec file. I referenced Jasmine style guide.
I also think using a new SelectRunsOption enum to represent available options will make the code clearer, so I added some suggestions inline for that as well. Lmk what you think or have any questions.
src/app/teacher/teacher-run-list/teacher-run-list.component.spec.ts
Outdated
Show resolved
Hide resolved
src/app/teacher/select-runs-controls/select-runs-controls.component.ts
Outdated
Show resolved
Hide resolved
src/app/teacher/select-runs-controls/select-runs-controls.component.ts
Outdated
Show resolved
Hide resolved
src/app/teacher/select-runs-controls/select-runs-controls.component.html
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
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.
Looks good!
🎉 This PR is included in version 5.112.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Changes
Test
Test with feat(Run): Allow teachers to archive runs WISE-API#225
Archive/unarchive a run using the run item menu list (the 3 dots menu on a run)
Archive/unarchive a run using the run item checkboxes and then the "Archive Selected"/"Unarchive Selected" button
Archive/unarchive a run that was shared with you
Make sure the select all runs checkbox works properly
Make sure the select runs drop down works properly for (all, none, running, completed)
Make sure switching from the active to archived view works properly
Closes #1012