Skip to content

feat: move sequence navigation to plugin slot#1716

Merged
brian-smith-tcril merged 2 commits intoopenedx:masterfrom
raccoongang:romaniuk/move-sequence-navigation-to-plugin-slot
May 29, 2025
Merged

feat: move sequence navigation to plugin slot#1716
brian-smith-tcril merged 2 commits intoopenedx:masterfrom
raccoongang:romaniuk/move-sequence-navigation-to-plugin-slot

Conversation

@ihor-romaniuk
Copy link
Contributor

@ihor-romaniuk ihor-romaniuk commented May 27, 2025

Description

This PR migrates the sequence navigation component in the Learning MFE to use the Frontend Plugin Framework's PluginSlot. This change enhances modularity and allows for easier customization of the sequence navigation UI via plugins.

Testing Instructions

  1. Navigate to a course's sequence page.
  2. Disable waffle flag courseware.enable_navigation_sidebar
  3. Verify that the sequence navigation functions as expected:
    • Navigation between units works correctly.
    • UI elements render properly.
  4. Implement a test plugin to override the sequence navigation via the new PluginSlot and confirm that the override behaves as intended.

Changelog

  • Migrated sequence navigation to use PluginSlot for enhanced customization capabilities.

@openedx-webhooks
Copy link

openedx-webhooks commented May 27, 2025

Thanks for the pull request, @ihor-romaniuk!

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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label May 27, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions May 27, 2025
@ihor-romaniuk ihor-romaniuk requested review from KristinAoki, bradenmacdonald and brian-smith-tcril and removed request for KristinAoki May 27, 2025 15:09
@ihor-romaniuk ihor-romaniuk force-pushed the romaniuk/move-sequence-navigation-to-plugin-slot branch from eafabfc to 649bc51 Compare May 27, 2025 15:12
@ihor-romaniuk ihor-romaniuk marked this pull request as ready for review May 27, 2025 15:18
@codecov
Copy link

codecov bot commented May 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.42%. Comparing base (d14c2a9) to head (b155031).
⚠️ Report is 37 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1716   +/-   ##
=======================================
  Coverage   90.41%   90.42%           
=======================================
  Files         343      344    +1     
  Lines        5781     5784    +3     
  Branches     1385     1347   -38     
=======================================
+ Hits         5227     5230    +3     
- Misses        535      537    +2     
+ Partials       19       17    -2     

☔ View full report in Codecov by Sentry.
📢 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.

@ihor-romaniuk ihor-romaniuk force-pushed the romaniuk/move-sequence-navigation-to-plugin-slot branch 2 times, most recently from 5e963ad to e476ffb Compare May 27, 2025 15:50
Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

Overall this is looking great!

I left a couple comments, one small suggestion, one nice-to-have, and one open question.

Thanks for the PR!

Comment on lines +22 to +24
sequenceId,
unitId,
nextHandler,
onNavigate,
previousHandler,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to hear others' opinions on if we want to have all of these as pluginProps. Adding pluginProps "locks us in" to supporting each of the props as part of the slot's API.

That being said, I do think all of the props here make sense.

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'm not completely sure about passing all props to pluginProps but made them available.
If you have any suggestions about removing some of them, let's do that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seeing them all in the new example confirms my original thought that keeping them all makes sense. I could see an argument that nextHandler and previousHandler aren't truly needed because onNavigate could be used for those instead, but I think keeping them makes for cleaner plugin code.

Comment on lines 9 to 13
* `sequenceId`
* `unitId`
* `nextHandler`
* `onNavigate`
* `previousHandler`
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker, but it'd be great to have a few examples of plugins that use these props.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated documentation with detailed description and example.

}) => (
<PluginSlot
id="org.openedx.frontend.learning.sequence_navigation.v1"
idAliases={['sequence_navigation_slot']}
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is a new slot it doesn't need any idAliases

Suggested change
idAliases={['sequence_navigation_slot']}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

@ihor-romaniuk ihor-romaniuk force-pushed the romaniuk/move-sequence-navigation-to-plugin-slot branch from e476ffb to b155031 Compare May 28, 2025 10:25
Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

Thank you so much for this!

LGTM!

Comment on lines +22 to +24
sequenceId,
unitId,
nextHandler,
onNavigate,
previousHandler,
Copy link
Contributor

Choose a reason for hiding this comment

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

Seeing them all in the new example confirms my original thought that keeping them all makes sense. I could see an argument that nextHandler and previousHandler aren't truly needed because onNavigate could be used for those instead, but I think keeping them makes for cleaner plugin code.

@brian-smith-tcril brian-smith-tcril merged commit a71152b into openedx:master May 29, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Contributions May 29, 2025
@ihor-romaniuk ihor-romaniuk deleted the romaniuk/move-sequence-navigation-to-plugin-slot branch May 30, 2025 11:53
@itsjeyd itsjeyd added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Jun 5, 2025
@openedx-webhooks openedx-webhooks removed the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Jun 5, 2025
@itsjeyd itsjeyd added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Jul 24, 2025
@openedx-webhooks openedx-webhooks removed the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Jul 24, 2025
@itsjeyd itsjeyd added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants