Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5f92fb9
feat: add the course pathways strip above the course header
ChrisChV Oct 4, 2026
3a903df
fix: recalculate the visible pathways when the labels change width
ChrisChV Oct 4, 2026
8a0ecd3
style: Add plugin images
ChrisChV Oct 4, 2026
d80d6e6
fix: measure the pathway labels from the start edge in RTL
ChrisChV Oct 4, 2026
4f0f65b
style: Nits on the code
ChrisChV Oct 5, 2026
8fea1e6
feat: add the ENABLE_PATHWAY_PILOT_UI flag to show the course pathway…
ChrisChV Oct 5, 2026
cca472a
fix: Broken tests
ChrisChV Oct 5, 2026
45ffc32
fix: move the pathway labels that do not fit entirely to the "+N" pop…
ChrisChV Oct 7, 2026
e8f73ea
refactor: turn the pathways strip slot into a generic course info str…
ChrisChV Oct 16, 2026
585c008
refactor: rename the pathway course counts to item counts
ChrisChV Oct 16, 2026
b4369de
refactor: remove the ENABLE_PATHWAY_PILOT_UI flag
ChrisChV Oct 16, 2026
fc95bb5
refactor: move the course pathways code to src/pathways with the stri…
ChrisChV Oct 23, 2026
3207829
refactor: Make tab page tyes and functions as generic
ChrisChV Oct 23, 2026
dbdce4b
feat: Implemented bare bonds of Pathway Tabs
ChrisChV Oct 24, 2026
1844046
feat: Pathway Progress page implemented
ChrisChV Oct 25, 2026
efd3ccb
feat: Pathway Achievements Tab Page implemented
ChrisChV Oct 26, 2026
fc48dd1
feat: Add usePathwayAchievements in pathway progress
ChrisChV Oct 26, 2026
a6e614d
Merge branch 'master' into chris/fal-4398-pathways-progress-achievements
ChrisChV Oct 26, 2026
c15ccf9
fix: Lint issues
ChrisChV Oct 27, 2026
ea55d39
refactor: Build NewsMode icon as React component
ChrisChV Oct 27, 2026
2a0860f
fix: Broken tests
ChrisChV Oct 27, 2026
175f455
feat: Link the pathways in the course strip to their outline
ChrisChV Oct 27, 2026
8bcd114
feat: Color the current grade by the pass grade and show "-" without …
ChrisChV Oct 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export const DECODE_ROUTES = {
],
REDIRECT_HOME: 'home/:courseId',
REDIRECT_SURVEY: 'survey/:courseId',
PATHWAY_OUTLINE: '/pathway/:pathwayId/outline',
PATHWAY_PROGRESS: '/pathway/:pathwayId/progress',
PATHWAY_ACHIEVEMENTS: '/pathway/:pathwayId/achievements',
} as const satisfies Readonly<{ [k: string]: string | readonly string[] }>;

export const ROUTES = {
Expand Down
21 changes: 21 additions & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ import DecodePageRoute from './decode-page-route';
import { DECODE_ROUTES, ROUTES } from './constants';
import PreferencesUnsubscribe from './preferences-unsubscribe';
import PageNotFound from './generic/PageNotFound';
import { PathwayOutline } from './pathways/PathwayOutline';
import { PathwayProgress } from './pathways/pathway-progress/PathwayProgress';
import { PathwayAchievements } from './pathways/pathways-achievements/PathwayAchievements';

const queryClient = createQueryClient();

Expand Down Expand Up @@ -133,6 +136,24 @@ subscribe(APP_READY, () => {
)}
/>
))}
<Route
path={DECODE_ROUTES.PATHWAY_OUTLINE}
element={(
<PathwayOutline />
)}
/>
<Route
path={DECODE_ROUTES.PATHWAY_PROGRESS}
element={(
<PathwayProgress />
)}
/>
<Route
path={DECODE_ROUTES.PATHWAY_ACHIEVEMENTS}
element={(
<PathwayAchievements />
)}
/>
</Routes>
</PluginOverridesProvider>
</ToastProvider>
Expand Down
4 changes: 4 additions & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -465,3 +465,7 @@
@import "course-tabs/course-tabs-navigation.scss";
@import "courseware/course/sidebar/common/SidebarBase.scss";
@import "courseware/course/sidebar/sidebars/course-outline/CourseOutlineTray.scss";
@import "pathways/pathways-strip/CoursePathwaysStrip.scss";
@import "pathways/pathway-tabs/PathwayTabsNavigation.scss";
@import "pathways/pathway-progress/progress-ring/PathwayProgressRing.scss";
@import "pathways/pathway-progress/pathway-completion/PathwayProgressDonut.scss";
3 changes: 3 additions & 0 deletions src/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jest.mock('./course-home/discussion-tab/DiscussionTab', () => 'Discussion Tab');
jest.mock('./course-home/progress-tab/ProgressTab', () => 'Progress Tab');
jest.mock('./courseware/course/course-exit', () => ({ CourseExit: 'Course Exit' }));
jest.mock('./courseware', () => 'Courseware Container');
jest.mock('./pathways/PathwayOutline', () => ({ PathwayOutline: 'Pathway Outline' }));
jest.mock('./pathways/pathway-progress/PathwayProgress', () => ({ PathwayProgress: 'Pathway Progress' }));
jest.mock('./pathways/pathways-achievements/PathwayAchievements', () => ({ PathwayAchievements: 'Pathway Achievements' }));

describe('app registry', () => {
let getElement;
Expand Down
19 changes: 19 additions & 0 deletions src/pathways/PathwayOutline.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { useParams } from 'react-router-dom';
import { usePathway } from './data/apiHooks';
import { TabPage } from './tab-page/TabPage';

export const PathwayOutline = () => {
const { pathwayId } = useParams();

const metadataQuery = usePathway(pathwayId);

return (
<TabPage
activeTabSlug="outline"
pathwayId={pathwayId}
pathwayStatus={{ metadataQuery }}
>
Outline
</TabPage>
);
};
158 changes: 158 additions & 0 deletions src/pathways/data/__fixtures__/pathways.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
import type {
PathwayAchievementData, PathwayData, PathwayProgressData, PathwaysByCourse,
} from '../types';

export const dataEngineering: PathwayData = {
pathway: {
id: 'pathway-1',
content: { displayName: 'Data Engineering Fundamentals' },
itemCount: 6,
category: 'bootcamp',
categoryLabel: 'Bootcamp',
},
progress: { completedItemCount: 3 },
provider: { name: 'MIT OpenCourseWare' },
};

export const machineLearning: PathwayData = {
pathway: {
id: 'pathway-2',
content: { displayName: 'Introduction to Machine Learning' },
itemCount: 12,
category: 'tutorial',
categoryLabel: 'Tutorial',
categoryBackgroundColor: '#FCE4F3',
categoryTextColor: '#9B1766',
},
progress: { completedItemCount: 0 },
provider: { name: 'Stanford' },
};

export const loremIpsum: PathwayData = {
pathway: {
id: 'pathway-3',
content: { displayName: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod' },
itemCount: 4,
category: 'tutorial',
categoryLabel: 'Tutorial',
},
progress: { completedItemCount: 1 },
provider: { name: 'Stanford' },
};

export const sedUt: PathwayData = {
pathway: {
id: 'pathway-4',
content: { displayName: 'Sed ut perspiciatis unde omnis iste natus' },
itemCount: 3,
category: 'tutorial',
categoryLabel: 'Tutorial',
},
progress: { completedItemCount: 0 },
};

export const nemoEnim: PathwayData = {
pathway: {
id: 'pathway-5',
content: { displayName: 'Nemo enim ipsam voluptatem' },
itemCount: 5,
category: 'certificate',
categoryLabel: 'Certificate',
},
progress: { completedItemCount: 2 },
};

export const courseIdWithPathways = 'course-v1:edX+DemoX+Demo_Course';
export const courseIdWithManyPathways = 'course-v1:edX+Many+Pathways';
export const courseIdWithoutPathways = 'course-v1:edX+No+Pathways';

export const pathwaysByCourse: PathwaysByCourse = {
[courseIdWithPathways]: [dataEngineering, machineLearning],
[courseIdWithManyPathways]: [dataEngineering, machineLearning, loremIpsum, sedUt, nemoEnim],
};

export const dataEngineeringProgress: PathwayProgressData = {
id: 'pathway-1',
itemCount: 6,
completedItemCount: 3,
grades: [
{
displayName: 'Introduction to Data Engineering',
progress: 100,
passGrade: 70,
currentGrade: 85,
detailsUrl: '/course/course-v1:edX+DE101+2026/progress',
},
{
displayName: 'Data Pipelines',
progress: 40,
passGrade: 70,
currentGrade: 30,
detailsUrl: '/course/course-v1:edX+DE102+2026/progress',
},
{
displayName: 'Data Warehousing',
progress: 65,
passGrade: 60,
currentGrade: 55,
detailsUrl: '/course/course-v1:edX+DE103+2026/progress',
},
{
displayName: 'Stream Processing',
progress: 0,
passGrade: 70,
currentGrade: 0,
detailsUrl: '/course/course-v1:edX+DE104+2026/progress',
},
{
displayName: 'Machine Learning Operations for Production Systems on Kubernetes',
progress: 20,
passGrade: 70,
currentGrade: 15,
detailsUrl: '/course/course-v1:edX+DE105+2026/progress',
},
],
};

export const dataEngineeringAchievements: PathwayAchievementData[] = [
{
credentialId: 'a1b2c3d4e5f60718293a4b5c6d7e8f90',
displayName: 'Data Engineering Fundamentals',
providerName: 'MIT OpenCourseWare',
completedOn: '2026-08-11',
certificateUrl: '/certificates/a1b2c3d4e5f60718293a4b5c6d7e8f90',
isOverarching: true,
},
{
credentialId: 'b2c3d4e5f60718293a4b5c6d7e8f90a1',
displayName: 'Introduction to Data Engineering with Python, SQL and Cloud Tools',
providerName: 'MIT OpenCourseWare',
completedOn: '2026-07-02',
certificateUrl: '/certificates/b2c3d4e5f60718293a4b5c6d7e8f90a1',
isOverarching: false,
},
{
credentialId: 'c3d4e5f60718293a4b5c6d7e8f90a1b2',
displayName: 'Data Pipelines',
providerName: 'MIT OpenCourseWare',
completedOn: '2026-07-20',
certificateUrl: '/certificates/c3d4e5f60718293a4b5c6d7e8f90a1b2',
isOverarching: false,
},
{
credentialId: 'd4e5f60718293a4b5c6d7e8f90a1b2c3',
displayName: 'Data Warehousing',
providerName: 'MIT OpenCourseWare',
completedOn: '2026-07-28',
certificateUrl: '/certificates/d4e5f60718293a4b5c6d7e8f90a1b2c3',
isOverarching: false,
},
{
credentialId: 'e5f60718293a4b5c6d7e8f90a1b2c3d4',
displayName: 'Stream Processing',
providerName: 'MIT OpenCourseWare',
completedOn: '2026-08-05',
certificateUrl: '/certificates/e5f60718293a4b5c6d7e8f90a1b2c3d4',
isOverarching: false,
},
];
10 changes: 10 additions & 0 deletions src/pathways/data/api.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { getPathwaysByCourse } from './api';

describe('course-pathways api', () => {
describe('getPathwaysByCourse', () => {
// Until the backend exists, no course has pathways
it('returns an empty map', async () => {
await expect(getPathwaysByCourse(['course-v1:edX+DemoX+Demo_Course'])).resolves.toEqual({});
});
});
});
40 changes: 40 additions & 0 deletions src/pathways/data/api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import type {
PathwayAchievementData, PathwayData, PathwayProgressData, PathwaysByCourse,
} from './types';

// TODO The backend is missing.
// This endpoint should receive a list of course IDs and return a map
// containing the pathways in which the learner is enrolled for each course.
// The response must be mapped here to the `PathwayData` shape.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const getPathwaysByCourse = async (_courseIds: string[]): Promise<PathwaysByCourse> => ({});

// TODO The backend is missing.
// This endpoint should receive a pathway ID and return that pathway, with the learner's
// progress in it. A missing pathway or a learner without access must make the request fail.
// The response must be mapped here to the `PathwayData` shape.
// Until then, every request fails.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const getPathway = async (_pathwayId: string): Promise<PathwayData> => {
throw new Error('The pathway backend is missing');
};

// TODO The backend is missing.
// This endpoint should receive a pathway ID and return the learner's progress in that pathway,
// with the grade of each of its items.
// The response must be mapped here to the `PathwayProgressData` shape.
// Until then, every request fails.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const getPathwayProgress = async (_pathwayId: string): Promise<PathwayProgressData> => {
throw new Error('The pathway progress backend is missing');
};

// TODO The backend is missing.
// This endpoint should receive a pathway ID and return the achievements the learner
// has earned in that pathway: the certificate of the pathway itself and those of its items.
// The response must be mapped here to the `PathwayAchievementData` shape.
// Until then, every request fails.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const getPathwayAchievements = async (_pathwayId: string): Promise<PathwayAchievementData[]> => {
throw new Error('The pathway achievements backend is missing');
};
Loading
Loading