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: default stale start dates to today #1180

Merged
merged 3 commits into from
Sep 16, 2024
Merged

Conversation

brobro10000
Copy link
Member

Based on a heuristic, default stale course start dates to today to display in various locations in the learner journey

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)
  • Ensure English strings are marked for translation. See documentation for more details.

Only if submitting a visual change

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

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

Attention: Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.39%. Comparing base (0d978d2) to head (8cfd7d8).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/components/course/data/utils.jsx 80.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1180      +/-   ##
==========================================
+ Coverage   88.36%   88.39%   +0.02%     
==========================================
  Files         396      396              
  Lines        8406     8407       +1     
  Branches     2025     2061      +36     
==========================================
+ Hits         7428     7431       +3     
+ Misses        936      933       -3     
- Partials       42       43       +1     

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

@brobro10000 brobro10000 force-pushed the hu/ent-9452 branch 2 times, most recently from 2366eab to 16d38f7 Compare September 13, 2024 01:39
@@ -73,7 +73,7 @@ export default function useEnterpriseCourseEnrollments(queryOptions = {}) {
},
enabled: isEnabled,
});

// TODO: Talk about how we don't have access to weeksToComplete on the dashboard page.
Copy link
Member

Choose a reason for hiding this comment

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

[curious] Should we backlog a ticket as a follow-up story to make the Dashboard start dates have parity to other start dates with regard to weeksToComplete? Maybe include the ticket number in the TODO comment?

Copy link
Member

Choose a reason for hiding this comment

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

We can tackle this in the follow-up PR for coverage tomorrow morning.

src/components/course/data/constants.js Show resolved Hide resolved
src/components/course/data/utils.jsx Outdated Show resolved Hide resolved
src/components/course/data/utils.jsx Outdated Show resolved Hide resolved
if (isCourseSelfPaced({ pacingType })) {
if (hasTimeToComplete({ end, weeksToComplete }) || isWithinMinimumStartDateThreshold({ start })) {
// always today's date (incentives enrollment)
return todayToIso;
Copy link
Member

Choose a reason for hiding this comment

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

Do we want test coverage on this 2 code paths?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, as discussed synchronously, the coverage can be a followup post testing on stage. Since the pipeline will be paused for both admin and learner portal, the coverage can be brought up to date with subsequent PRs tomorrow to get started on testing.

That being said there is a component that uses identical logic useCourseRunCardHeading which reuses the same logic which I will piggyback off of for testing 👍🏽

src/components/course/data/utils.jsx Outdated Show resolved Hide resolved
src/components/course/data/utils.jsx Outdated Show resolved Hide resolved
src/components/course/data/utils.jsx Outdated Show resolved Hide resolved
@adamstankiewicz adamstankiewicz merged commit f1887e4 into master Sep 16, 2024
5 of 6 checks passed
@adamstankiewicz adamstankiewicz deleted the hu/ent-9452 branch September 16, 2024 21: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