Skip to content

add a loading state to DashboardCard #2216

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

Merged
merged 2 commits into from
Apr 29, 2025

Conversation

gumaerc
Copy link
Contributor

@gumaerc gumaerc commented Apr 28, 2025

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/7106

Description (What does it do?)

This PR adds a loading state to the DashboardCard component, currently used in the enrollments dashboard. As part of this, some minor refactoring was done in the structure of DashboardCard.

Screenshots (if appropriate):

image
image

How can this be tested?

  • On line 199 of frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/EnrollmentDisplay.tsx, temporarily set isLoading={true}, like this:
      <EnrollmentExpandCollapse
        shownEnrollments={shownEnrollments}
        hiddenEnrollments={expired}
        isLoading={true}
      />
  • Spin up mit-learn on this branch
  • Ensure you have Posthog connected to your local instance of mit-learn
  • In your connected Posthog project, make sure you have added and enabled the enrollment-dashboard feature flag
  • Visit http://open.odl.local:8062/dashboard and log in (if you are not already logged in)
  • Ensure that you see the loading state in both desktop and mobile views
  • Set the line we changed earlier back to isLoading={isLoading} and save the file
  • Ensure that the cards look unchanged compared to RC

Copy link

OpenAPI Changes

Show/hide No detectable change.

@gumaerc gumaerc added the Needs Review An open Pull Request that is ready for review label Apr 28, 2025
@shanbady shanbady self-assigned this Apr 29, 2025
Copy link
Contributor

@shanbady shanbady 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 LGTM 👍

@shanbady shanbady assigned gumaerc and unassigned shanbady Apr 29, 2025
@shanbady shanbady added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Apr 29, 2025
@gumaerc gumaerc merged commit e4b8e3d into main Apr 29, 2025
13 checks passed
@gumaerc gumaerc deleted the cg/enrollments-dashboard-loading-skeleton branch April 29, 2025 19:08
This was referenced May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants