feat: Add slot for customizing course outline sidebar unit icons#1919
feat: Add slot for customizing course outline sidebar unit icons#1919xitij2000 wants to merge 1 commit into
Conversation
|
Thanks for the pull request, @xitij2000! 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. |
Introduces `CourseOutlineSidebarUnitIconSlot` to enable customization, modification, or replacement of unit icons in the course outline sidebar. Refactors `UnitIcon` to support TypeScript and updates related components to integrate with the new slot.
bf4996f to
1c07116
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1919 +/- ##
==========================================
+ Coverage 91.30% 91.31% +0.01%
==========================================
Files 344 345 +1
Lines 5774 5783 +9
Branches 1351 1385 +34
==========================================
+ Hits 5272 5281 +9
Misses 483 483
Partials 19 19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This feels very narrowly scoped, and I'm thinking it might make more sense to have a slot that contains the entire unit link instead of just the icon. Then instead of replacing |
|
@brian-smith-tcril The reason I kept is narrow is that making it broader would also kind of freeze a larger part of the props as API. However, I understand that just the icons would be too narrow. I'll look into changing this. I have some time off coming up next week so might only be able to fully look into and and wrap it up after I return. |
|
It's probably worth talking through the possible options here. I'd like to find a good balance between "this does everything people could possibly want when customizing the unit links in the sidebar" and "this locks us in to way too many pluginProps." The ideas that come to mind for me are:
|
Introduces
CourseOutlineSidebarUnitIconSlotto enable customization, modification, or replacement of unit icons in the course outline sidebar.