-
Notifications
You must be signed in to change notification settings - Fork 33
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: enable allocation of restricted runs #1359
Conversation
ab2a50c
to
23415e4
Compare
...onents/learner-credit-management/data/hooks/useCatalogContainsContentItemsMultipleQueries.js
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/cards/BaseCourseCard.jsx
Outdated
Show resolved
Hide resolved
...onents/learner-credit-management/data/hooks/useCatalogContainsContentItemsMultipleQueries.js
Outdated
Show resolved
Hide resolved
...onents/learner-credit-management/data/hooks/useCatalogContainsContentItemsMultipleQueries.js
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/assignment-modal/NewAssignmentModalButton.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/cards/data/useCourseCardMetadata.jsx
Outdated
Show resolved
Hide resolved
39ea5ad
to
5e2d0bd
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1359 +/- ##
==========================================
- Coverage 85.78% 85.78% -0.01%
==========================================
Files 604 606 +2
Lines 13273 13315 +42
Branches 2792 2762 -30
==========================================
+ Hits 11386 11422 +36
- Misses 1819 1825 +6
Partials 68 68 ☔ View full report in Codecov by Sentry. |
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.
Looking good; largely just some nits for consideration, and have one clarifying/curiosity question around the Skeleton
loading states rendering before coming back to leave a 👍
src/components/learner-credit-management/members-tab/tests/MembersTab.test.jsx
Outdated
Show resolved
Hide resolved
enrollByDate: dayjs(courseRun.enrollBy).format(SHORT_MONTH_DATE_FORMAT), | ||
{courseRuns.length > 0 && courseRuns.map(courseRun => { | ||
if (isLoading) { | ||
return (<span className="dropdown-item" data-testid="assignment-dropdown-item"><Skeleton /></span>); |
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.
[curious/suggestion] Might be worth using Dropdown.Item
here to avoid hardcoding class names like dropdown-item
(which could, in theory, eventually change in the underlying Paragon component).
I'm assuming it wasn't used since out-of-the-box, the Skeleton
doesn't seem to appear in the Dropdown.Item
. This seems due to the display: flex
derived from the pgn__dropdown-item
class name.
Consider trying the following to override the pgn__dropdown-item
class name with d-block
to make it display: block
instead.
<Dropdown.Item className="d-block" data-testid="assignment-dropdown-item-skeleton">
<Skeleton />
</Dropdown.Item>
See demo in Paragon Playground.
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 originally tried that without the className="d-block"
, but it didn't work so I gave up on Dropdown.Item. How did you know d-block
fixes it?
src/components/learner-credit-management/cards/BaseCourseCard.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/cards/tests/CourseCard.test.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/cards/tests/CourseCard.test.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/assignment-modal/NewAssignmentModalDropdown.jsx
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.
Approved to unblock 👍🏽 , minor nits
src/components/learner-credit-management/members-tab/tests/MembersTab.test.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/assignment-modal/NewAssignmentModalButton.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/assignment-modal/NewAssignmentModalButton.jsx
Outdated
Show resolved
Hide resolved
847d3cb
to
46976ea
Compare
46976ea
to
9eda274
Compare
ENT-9411
Two skeletons appear briefly while simulating a slow network connection. Note that the dropdown contains only one skeleton item despite ultimately displaying two runs in the following screenshot:
After the page fully loads, the skeleton states all disappear, and the number of courses (left side) jumps up from "(1) available date" to "(2) available dates".
Selecting the restricted run opens the assignment modal and displays the correct fixed price for the restricted run:
After assigning it to myself, I see the assignment appear in the assignments table: