Skip to content
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

Merged
merged 47 commits into from
Sep 18, 2023

Conversation

geoffreykwan
Copy link
Member

@geoffreykwan geoffreykwan commented Apr 9, 2023

Changes

  • Teachers can now archive runs
  • Removed filter by period select drop down in Class Schedule view
  • There is now an active runs view and an archived runs view

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

@geoffreykwan geoffreykwan added the enhancement New feature of any size or improvement (UI, performance, security) label Apr 9, 2023
@geoffreykwan geoffreykwan self-assigned this Apr 9, 2023
@geoffreykwan geoffreykwan marked this pull request as ready for review April 9, 2023 16:52
@geoffreykwan geoffreykwan marked this pull request as draft April 15, 2023 20:30
@geoffreykwan geoffreykwan marked this pull request as ready for review August 17, 2023 16:24
Copy link
Member

@hirokiterashima hirokiterashima left a 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/run-menu/run-menu.component.ts Outdated Show resolved Hide resolved
src/app/services/archive-project.service.ts Outdated Show resolved Hide resolved
@hirokiterashima
Copy link
Member

The new undo feature works great.

Should we hide or disable the SelectRunsControls if there are no runs to select? It seems a bit strange to have it there.
Screenshot 2023-08-28 at 11 20 42 AM

@breity
Copy link
Member

breity commented Aug 28, 2023

Should we hide or disable the SelectRunsControls if there are no runs to select? It seems a bit strange to have it there.

Ah, yep. Good catch. We should hide them.
EDIT: Actually, none of that should be visible when there aren't any active runs. User should see the notice with text "Hey there! Looks like you haven't run any WISE units in your classes yet..." It's this code in TeacherRunListComponent:

<div class="notice" *ngIf="!runs.length && loaded">
  <p i18n>Hey there! Looks like you haven't run any WISE units in your classes yet.</p>
  <p i18n>Select "Unit Library" to find titles to use with your students.</p>
</div>
<div class="content-block" *ngIf="runs.length">
...

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.").

Copy link
Member

@hirokiterashima hirokiterashima left a 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:

  1. In both active and archive views, add “scheduled” select-option, and show the option order as follows: All -> None -> Completed -> Running -> Scheduled

  2. 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.

  3. Change message when there are no archived runs to “You don’t have any archived classroom units.” Also remove the count message.

  4. See minor code comments inline

src/app/teacher/run-menu/run-menu.component.ts Outdated Show resolved Hide resolved
src/app/teacher/run-menu/run-menu.component.ts Outdated Show resolved Hide resolved
Copy link
Member

@hirokiterashima hirokiterashima left a 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.

Copy link
Member

@hirokiterashima hirokiterashima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@breity breity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@geoffreykwan geoffreykwan merged commit 16d6b90 into develop Sep 18, 2023
2 checks passed
@geoffreykwan geoffreykwan deleted the issue-1012-allow-teacher-to-archive-runs branch September 18, 2023 20:54
@hirokiterashima
Copy link
Member

🎉 This PR is included in version 5.112.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature of any size or improvement (UI, performance, security) released
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

feat(Run): Allow teachers to archive units/runs
3 participants