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: add cookies for archived courses in highlights #1160

Merged
merged 18 commits into from
Feb 12, 2024

Conversation

katrinan029
Copy link
Contributor

@katrinan029 katrinan029 commented Jan 22, 2024

Description

Set cookies in the admin portal to indicate whether the admin's created highlights have newly archived courses. The goal is to display a red notification bubble on the 'Highlights' menu item in the sidebar whenever a course in their highlights is archived. This notification will persist until the user opens the Highlights summary page and dismisses the alert.

UI Changes

Screen.Recording.2024-02-08.at.2.50.41.PM.mov

JIRA

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

@katrinan029 katrinan029 requested a review from kiram15 January 22, 2024 03:06
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (559308a) 85.44% compared to head (6cf5f28) 85.46%.

Files Patch % Lines
...ts/EnterpriseApp/data/enterpriseCurationReducer.js 78.12% 6 Missing and 1 partial ⚠️
...ontentHighlights/ContentHighlightArchivedAlert.jsx 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1160      +/-   ##
==========================================
+ Coverage   85.44%   85.46%   +0.02%     
==========================================
  Files         497      498       +1     
  Lines       10756    10830      +74     
  Branches     2256     2267      +11     
==========================================
+ Hits         9190     9256      +66     
- Misses       1523     1530       +7     
- Partials       43       44       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@katrinan029 katrinan029 marked this pull request as ready for review January 23, 2024 23:56
@katrinan029 katrinan029 requested a review from a team January 23, 2024 23:56
Comment on lines 77 to 78
* the content is not considered archived. An "unpublished" course run is not considered "archived" because
* it could have a scheduled course run in the future.
Copy link
Member

Choose a reason for hiding this comment

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

[clarification] I suppose the reason I'm concerned about unpublished is that a course that might have courseRunStatuses: ["archived", "unpublished"], the unpublished course run is effectively unusable by learners (hidden). The only actionable course run status in the courseRunStatuses array remaining that's relevant / displayed to learners would be archived, despite having a courseRunStatuses length of 2.

With the logic, as is, in isArchivedContent, we would consider the course to be non-archived despite the only available course run displayed to learners being archived.

Copy link
Member

@adamstankiewicz adamstankiewicz 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! I just left one suggestion for a proposed refactor to make logic a bit more concise in the function that determines whether the provided course run statuses are deemed "archived".

@katrinan029 katrinan029 merged commit a3e568f into master Feb 12, 2024
6 checks passed
@katrinan029 katrinan029 deleted the knguyen2/ent-8239 branch February 12, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants