feat: add org.openedx.frontend.layout.header_discussions.v1 plugin slot#868
Open
brian-smith-tcril wants to merge 1 commit into
Open
feat: add org.openedx.frontend.layout.header_discussions.v1 plugin slot#868brian-smith-tcril wants to merge 1 commit into
org.openedx.frontend.layout.header_discussions.v1 plugin slot#868brian-smith-tcril wants to merge 1 commit into
Conversation
Wraps the LearningHeader in DiscussionsHome with a new `org.openedx.frontend.layout.header_discussions.v1` plugin slot so the discussions header can be wrapped, modified, or replaced via the plugin framework. Implemented in TypeScript with prop types via an interface and ES6 default parameters in place of PropTypes/defaultProps. Closes openedx#857 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
org.openedx.frontend.layout.header_discussions.v1 plugin slot
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #868 +/- ##
==========================================
- Coverage 94.64% 94.57% -0.07%
==========================================
Files 164 165 +1
Lines 3623 3632 +9
Branches 988 997 +9
==========================================
+ Hits 3429 3435 +6
- Misses 181 184 +3
Partials 13 13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
org.openedx.frontend.layout.header_discussions.v1plugin slot wrappingLearningHeaderso the discussions header can be wrapped, modified, or replaced via the plugin framework — mirroring the HeaderSlot pattern infrontend-app-learning.HeaderSlotintoDiscussionsHomein place of the directLearningHeaderimport.HeaderSlotPropsinterface and defaults use ES6 default parameters instead ofPropTypes/defaultProps.src/plugin-slots/README.md.Closes #857
Test plan
npm run lintpassesnpx tsc --noEmitpassesnpm testpassesWrapplugin against the slot renders around the default header (border example)keepDefault: false+Insertplugin fully replaces the header (custom example)🤖 Generated with Claude Code (I copied the
.jsxHeaderSlotcomponent fromfrontend-app-learningand had claude convert the proptypes to typescript)