Skip to content

feat: program dashboard progress page initial layout#5

Merged
MaxFrank13 merged 1 commit into
program-dashboard-featurefrom
mfrank/prorgram-dashboard-progress-page
Oct 31, 2025
Merged

feat: program dashboard progress page initial layout#5
MaxFrank13 merged 1 commit into
program-dashboard-featurefrom
mfrank/prorgram-dashboard-progress-page

Conversation

@MaxFrank13
Copy link
Copy Markdown
Member

@MaxFrank13 MaxFrank13 commented Oct 29, 2025

This is a PR to set up the general component layout for the Program Progress Page. This page consists of:

  • Main page (ProgramProgress/index.tsx)
  • Header for the Progress Page (ProgramProgress/ProgramProgressHeader.tsx)
  • Info section about progress status (ProgramProgress/ProgramProgressInfo.tsx)
  • Section for Courses separated by status (In progress, Completed, Remaining) (ProgramProgress/ProgramProgressCourses.tsx)
  • Sidebar for rendering progress towards certificate, earned certificates, and links to the program record page (ProgramProgress/ProgramProgressSidebar.tsx)

The Layout roughly looks like this:

<ProgramProgress>
  <ProgramProgressHeader />
  <ProgramProgressInfo />
  <ProgramProgressCourses />
  <ProgramProgressSidebar />
</ProgramProgress>

The base index.tsx file handles the API call to retrieve data for the program. The data is fed to child components as needed.

No tests are included in this PR.

For prior art, the frontend-app-learner-portal-enterprise program-progress component was used as well as the legacy Program Dashboard.

Copy link
Copy Markdown
Member

@deborahgu deborahgu left a comment

Choose a reason for hiding this comment

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

this looks good to me, although some things I don't understand. , I know @jsnwesson was going to look at it as well and he presumably understands more of them. :-)

&& programProgressData.programData
&& programProgressData.urls;

// TODO: for review: https://stackoverflow.com/questions/75706357/react-useparams-returns-string-undefined
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what's this about?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

On line 22, there is some typecasting going on. I've never had to do it before but it's the only way I've found to satisfy Typescript when using the useParams hook from React Router. I put the link to the stackoverflow that gave me the idea so that reviewers could easily see why I did that. But it should probably be removed and just included in the PR description


if (!hasProgramProgressData) {
return (
<div>Loading...</div>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this the error condition that we would see if there is a request out that hasn't returned yet? Is this placeholder?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes it is placeholder. I will replace it with the LoadingSpinner (link) from Paragon.

And yes it is what the user will see while the request is pending. It's the first thing that is rendered to the page, then the request is made, the response comes back, updates state variables, which triggers a re-render in React, which will either render the error state (NotFoundPage) or the actual page


if (programProgressEndpointError) {
return (
<div>Not found page</div>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this placeholder?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes it is. It will be replaced with an alert similar to what's in the enterprise version

@MaxFrank13 MaxFrank13 merged commit 5869619 into program-dashboard-feature Oct 31, 2025
3 checks passed
@MaxFrank13 MaxFrank13 deleted the mfrank/prorgram-dashboard-progress-page branch October 31, 2025 15:15
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.

2 participants