Skip to content

feat: Pathway pages with tabs navigation [FC-0137] - #2231

Open
ChrisChV wants to merge 15 commits into
openedx:masterfrom
open-craft:chris/fal-4398-pathway-tabs
Open

ChrisChV wants to merge 15 commits into
openedx:masterfrom
open-craft:chris/fal-4398-pathway-tabs

Conversation

@ChrisChV

@ChrisChV ChrisChV commented Oct 28, 2026 •

Copy link
Copy Markdown

Description

Review only the changes of this PR: open-craft/frontend-app-learning@chris/fal-4397-course-pathway-strip...chris/fal-4398-pathway-tabs

It adds the pathway pages and the navigation between them. The content of the Progress and Achievements tabs comes in the next PRs.

  • Moves deriveView and the tab status type out of the course TabPage into src/tab-page/utils.ts, and makes them generic
  • Adds the pathway pages under /pathway/:pathwayId/outline, /pathway/:pathwayId/progress and /pathway/:pathwayId/achievements.
  • Adds the pathway TabPage: header with the pathway title and provider, loading and error states, the tabs navigation and the footer.
  • Adds the tabs navigation (Outline, Progress, Achievements), wrapped in the new org.openedx.frontend.learning.pathway_tab_links.v1 plugin slot
  • Links each pathway of the course pathways strip.
image

Supporting Information

Testing instructions

Notes

  • TODO: The backend still needs to be connected once it's ready.
  • TODO: The Outline tab title must be the category label of the pathway.
  • I used Claude Opus 5.5 to review my code and create tests.

Stack

ChrisChV and others added 14 commits October 4, 2026 14:16
Show, above the learning header, the pathways that include the current
course and in which the learner is enrolled. The labels that do not fit
are moved to a "+N" popover, following the same logic as the course card
strip in the learner dashboard.

- Add the `course-pathways` data layer: `getPathwaysByCourse` in the API
  layer, which returns an empty map until the backend exists, and the
  `useCoursePathways` hook, which extracts the course pathways from it.
- Add the `CoursePathwaysStrip` and `MorePathwaysPopover` components and
  the `useVisiblePathways` hook to split the visible and hidden pathways.
- Add the `org.openedx.frontend.learning.course_pathways_strip.v1` plugin
  slot, rendered by `TabPage` once the course page has loaded.
- Add mock pathways as test fixtures.
…over and align it to the end of the strip

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 28, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @ChrisChV!

This repository is currently maintained by @openedx/committers-frontend-app-learning.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.28%. Comparing base (230799e) to head (1516856).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2231      +/-   ##
==========================================
+ Coverage   96.16%   96.28%   +0.12%     
==========================================
  Files         368      389      +21     
  Lines        6019     6215     +196     
  Branches     1486     1513      +27     
==========================================
+ Hits         5788     5984     +196     
  Misses        222      222              
  Partials        9        9              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@itsjeyd

itsjeyd commented Nov 6, 2026

Copy link
Copy Markdown

@ChrisChV @cassiezamparini Since this PR is part of Pathways, can we consider it approved from a product perspective?

@itsjeyd itsjeyd moved this from Needs Triage to Waiting on Author in Contributions Nov 6, 2026
@cassiezamparini

Copy link
Copy Markdown

@itsjeyd

Since this PR is part of Pathways, can we consider it approved from a product perspective?

I'll leave @ChrisChV to answer this one.

@ChrisChV

ChrisChV commented Nov 9, 2026

Copy link
Copy Markdown
Author

@ChrisChV @cassiezamparini Since this PR is part of Pathways, can we consider it approved from a product perspective?

@itsjeyd It's in internal dev review

@rpenido rpenido left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank for your work @ChrisChV!

I added some comments.

Comment thread src/index.jsx Outdated
<Route
path={DECODE_ROUTES.PATHWAY_OUTLINE}
element={(
<PathwayOutline />

@rpenido rpenido Nov 16, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Every other route in this file ends up inside PageWrap, directly or through DecodePageRoute, and PageWrap is the only place in this app that calls sendPageEvent() when the pathname changes. These three routes render their page elements directly, so opening a pathway page, or switching between its tabs, produces no analytics.

Suggested change
<PathwayOutline />
<DecodePageRoute>
<PathwayOutline />
</DecodePageRoute>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated 1516856

Comment thread src/index.jsx Outdated
<Route
path={DECODE_ROUTES.PATHWAY_PROGRESS}
element={(
<PathwayProgress />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
<PathwayProgress />
<DecodePageRoute>
<PathwayProgress />
</DecodePageRoute>

Comment thread src/index.jsx Outdated
<Route
path={DECODE_ROUTES.PATHWAY_ACHIEVEMENTS}
element={(
<PathwayAchievements />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
<PathwayAchievements />
<DecodePageRoute>
<PathwayAchievements />
</DecodePageRoute>

Comment on lines +14 to +19
<Link
to={url}
className={classNames('nav-item flex-shrink-0 nav-link', { active: slug === activeTabSlug })}
>
{title}
</Link>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
<Link
to={url}
className={classNames('nav-item flex-shrink-0 nav-link', { active: slug === activeTabSlug })}
>
{title}
</Link>
<Link
to={url}
aria-current={slug === activeTabSlug ? 'page' : undefined}
className={classNames('nav-item flex-shrink-0 nav-link', { active: slug === activeTabSlug })}
>
{title}
</Link>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated 1516856

Comment thread src/tab-page/utils.ts Outdated
);

export interface TabView {
isLoading: boolean;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do you think we can change this to make it consistent with Tanstack?

Suggested change
isLoading: boolean;
isPending: boolean;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated 1516856

{ tabId: 'outline', route: DECODE_ROUTES.PATHWAY_OUTLINE, message: messages.home },
{ tabId: 'progress', route: DECODE_ROUTES.PATHWAY_PROGRESS, message: messages.progress },
{ tabId: 'achievements', route: DECODE_ROUTES.PATHWAY_ACHIEVEMENTS, message: messages.achievements },
];

@rpenido rpenido Nov 16, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What do you think about a PATHWAY_TAB_SLUGS (here or in a new pathway-tabs/constants.ts file)?

Then we can remove the hardcoded string in the components (i.e. activeTabSlug="outline" in PathwayOutline.tsx) and we can rename them in one place.

I added a suggestion in another comment: https://github.com/openedx/frontend-app-learning/pull/2231/changes#r4587858520

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated 1516856

Comment on lines +8 to +14

const PATHWAY_TABS = [
// TODO: The Outline Tab title must be the category label
{ tabId: 'outline', route: DECODE_ROUTES.PATHWAY_OUTLINE, message: messages.home },
{ tabId: 'progress', route: DECODE_ROUTES.PATHWAY_PROGRESS, message: messages.progress },
{ tabId: 'achievements', route: DECODE_ROUTES.PATHWAY_ACHIEVEMENTS, message: messages.achievements },
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
const PATHWAY_TABS = [
// TODO: The Outline Tab title must be the category label
{ tabId: 'outline', route: DECODE_ROUTES.PATHWAY_OUTLINE, message: messages.home },
{ tabId: 'progress', route: DECODE_ROUTES.PATHWAY_PROGRESS, message: messages.progress },
{ tabId: 'achievements', route: DECODE_ROUTES.PATHWAY_ACHIEVEMENTS, message: messages.achievements },
];
export const PATHWAY_TAB_SLUGS = {
OUTLINE: 'outline',
PROGRESS: 'progress',
ACHIEVEMENTS: 'achievements',
} as const;
const PATHWAY_TABS = [
// TODO: The Outline Tab title must be the category label
{ tabId: PATHWAY_TAB_SLUGS.OUTLINE, route: DECODE_ROUTES.PATHWAY_OUTLINE, message: messages.home },
{ tabId: PATHWAY_TAB_SLUGS.PROGRESS, route: DECODE_ROUTES.PATHWAY_PROGRESS, message: messages.progress },
{ tabId: PATHWAY_TAB_SLUGS.ACHIEVEMENTS, route: DECODE_ROUTES.PATHWAY_ACHIEVEMENTS, message: messages.achievements },
];

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated 1516856

@@ -0,0 +1,54 @@
# Pathway Tab Links Slot

### Slot ID: `org.openedx.frontend.learning.pathway_tab_links.v1`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We are missing the screenshots for this slot.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated 1516856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U product review PR requires product review before merging

Projects

Status: Waiting on Author
Status: In Progress

Development

Successfully merging this pull request may close these issues.

5 participants