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: enable allocation of restricted runs #1359

Merged
merged 2 commits into from
Dec 4, 2024
Merged

Conversation

pwnage101
Copy link
Contributor

@pwnage101 pwnage101 commented Nov 26, 2024

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:
Screenshot 2024-12-04 at 11 37 11 AM copy

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".
Screenshot 2024-12-04 at 11 38 32 AM copy

Selecting the restricted run opens the assignment modal and displays the correct fixed price for the restricted run:
Screenshot 2024-12-04 at 11 50 38 AM

After assigning it to myself, I see the assignment appear in the assignments table:
image

@pwnage101 pwnage101 force-pushed the pwnage101/ENT-9411 branch 11 times, most recently from 39ea5ad to 5e2d0bd Compare December 3, 2024 16:50
@pwnage101 pwnage101 marked this pull request as ready for review December 3, 2024 19:05
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 87.75510% with 6 lines in your changes missing coverage. Please review.

Project coverage is 85.78%. Comparing base (1a537e4) to head (9eda274).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/data/services/EnterpriseCatalogApiServiceV2.js 37.50% 5 Missing ⚠️
src/index.jsx 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

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.

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 👍

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>);
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

@brobro10000 brobro10000 left a 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

@pwnage101 pwnage101 force-pushed the pwnage101/ENT-9411 branch 4 times, most recently from 847d3cb to 46976ea Compare December 4, 2024 21:21
@pwnage101 pwnage101 merged commit 0c35ab3 into master Dec 4, 2024
6 checks passed
@pwnage101 pwnage101 deleted the pwnage101/ENT-9411 branch December 4, 2024 21:38
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