feat: move sequence navigation to plugin slot#1716
Conversation
|
Thanks for the pull request, @ihor-romaniuk! This repository is currently maintained by 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 approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo 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:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
eafabfc to
649bc51
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
5e963ad to
e476ffb
Compare
brian-smith-tcril
left a comment
There was a problem hiding this comment.
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!
| sequenceId, | ||
| unitId, | ||
| nextHandler, | ||
| onNavigate, | ||
| previousHandler, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| * `sequenceId` | ||
| * `unitId` | ||
| * `nextHandler` | ||
| * `onNavigate` | ||
| * `previousHandler` |
There was a problem hiding this comment.
Not a blocker, but it'd be great to have a few examples of plugins that use these props.
There was a problem hiding this comment.
Updated documentation with detailed description and example.
| }) => ( | ||
| <PluginSlot | ||
| id="org.openedx.frontend.learning.sequence_navigation.v1" | ||
| idAliases={['sequence_navigation_slot']} |
There was a problem hiding this comment.
Since this is a new slot it doesn't need any idAliases
| idAliases={['sequence_navigation_slot']} |
e476ffb to
b155031
Compare
brian-smith-tcril
left a comment
There was a problem hiding this comment.
Thank you so much for this!
LGTM!
| sequenceId, | ||
| unitId, | ||
| nextHandler, | ||
| onNavigate, | ||
| previousHandler, |
There was a problem hiding this comment.
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.
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
courseware.enable_navigation_sidebarPluginSlotand confirm that the override behaves as intended.Changelog
PluginSlotfor enhanced customization capabilities.