feat: Course outline restructure with new plugin slots - #1920
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. |
44ec042 to
cd853d0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1920 +/- ##
==========================================
+ Coverage 91.46% 91.47% +0.01%
==========================================
Files 351 351
Lines 5820 5831 +11
Branches 1390 1393 +3
==========================================
+ Hits 5323 5334 +11
Misses 478 478
Partials 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@brian-smith-tcril Did you get a chance to look at this PR? |
Not quite yet. I've been focused on a release testing bug fix. I definitely haven't forgotten about it and it's still high on my todo list. |
brian-smith-tcril
left a comment
There was a problem hiding this comment.
Overall these extension points seem like good ones to add. Looking forward to continuing to discuss these changes and finding a good path for them to land!
|
|
||
| return ( | ||
| <li className={classNames({ 'bg-info-100': isActive, 'border-top border-light': !isFirst })}> | ||
| <li className={classNames({ 'active-unit bg-info-100': isActive, 'border-top border-light': !isFirst })}> |
There was a problem hiding this comment.
active-unit doesn't appear to exist.
|
Just giving context on some of the issues:
I tried splitting this PR into two parts, however there were quite a few dependencies between the commits so it wasn't as easy a split as I hoped. I'll apply the other fixes first. |
dc917eb to
d627014
Compare
I'm open to discussing those changes, but I'd like to keep this PR focused on adding the plugin slots. By keeping the PR focused we won't have changes blocking each other from landing.
That's probably fine, but I'd still prefer to have this as a "just adding slots" PR.
I'm sorry about that. I know it can be frustrating to split things up, but I think the benefits of focused PRs are very real. |
|
@brian-smith-tcril I've split out the slots into this PR: #1933 A test is failing locally so I still have work to do, but I'll rebase this PR once that one is merged. |
c3daaa0 to
f59ca84
Compare
| variant="tertiary" | ||
| className={classNames( | ||
| 'd-flex align-items-center w-100 px-4 py-3.5 rounded-0 justify-content-start', | ||
| { 'bg-info-100': isActiveSection }, |
There was a problem hiding this comment.
This is now applied via SCSS
Splits useCourseOutlineSidebar into useCourseOutlineData and useCourseOutlineSidebar for improved separation of responsibilities. Updates components to reflect this change. This allows the course outline to be used outside of a sidebar context.
- Replace hardcoded border color (#d7d3d1) with var(--pgn-color-light-700) in CourseOutlineTray.scss for theme compatibility. - Move active-section highlight to a dedicated .active-section class on SidebarSection and add an .active-unit class on SidebarUnit.
f59ca84 to
cc980c5
Compare
cc980c5 to
614ced5
Compare
|
@brian-smith-tcril I've updated this PR. FYI: the update to the |
|
Hi @brian-smith-tcril, would you have time to take another look at this PR? |
| const handleClick = React.useCallback(() => { | ||
| // Hide the sidebar after selecting a unit on a mobile device. | ||
| if (shouldDisplayFullScreen) { | ||
| handleToggleCollapse(); | ||
| } | ||
| handleUnitClick({ sequenceId, activeUnitId, id }); | ||
| }, [handleUnitClick, sequenceId, activeUnitId, id, shouldDisplayFullScreen, handleToggleCollapse]); |
There was a problem hiding this comment.
In #1920 (comment) I mentioned
This might not be needed after #1923 lands, worth double checking once that's in.
#1923 has landed now, I haven't looked to deeply into if that would change what needs to happen here or not. Anything stand out to you as no longer needed or as something that should change now that it has landed?
|
@itsjeyd I took another look and resolved a lot of my old comments. @xitij2000 this PR has a conflict in |
Splits
useCourseOutlineSidebarintouseCourseOutlineData+useCourseOutlineSidebar, addsCourseOutlineSidebarHeadingSlot,CourseOutlineSidebarSectionCompletionIconSlot, andCourseOutlineSidebarSequenceCompletionIconSlot, and introduces CSS variables for theming the sidebar.