-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add direct plugin framework #16
Conversation
…edx/frontend-plugin-framework into jwesson/add-direct-plugin-framework
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #16 +/- ##
==========================================
- Coverage 75.19% 72.61% -2.58%
==========================================
Files 10 13 +3
Lines 129 168 +39
Branches 19 30 +11
==========================================
+ Hits 97 122 +25
- Misses 30 44 +14
Partials 2 2 ☔ View full report in Codecov by Sentry. |
* added some further documentation to explain what the configuration of allSlotChanges and slotChanges should look like * changed variable naming from original source code to better define data objects * changed assumption of what is returned by DirectPluginContext to be a single object and not array
|
||
/** | ||
This is what the allSlotChanges configuration should look like when passed into DirectPluginContext | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one thing that I decided to change in order to steer away from Braden's approach and move closer to eventually using a JS-based config is that his configuration assumed that there'd be multiple allSlotChanges
for a Host MFE, and I think whatever benefit that had could've eventually led to confusion/oversight.
I'd argue that keeping all known changes in this one object is easier to track, especially as they'll ideally live in a single JS config anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together. It looks great so far. I just had some questions to clear up things that were still hazy to me and a couple recommendations that were pretty minor.
APER-3108
This PR formally adds Braden McDonald's plugin framework as a non-iFrame alternative for the library. The logic is still separated from the original framework's handling, so a follow-up ticket will be to integrate the two plugins -- iFrame and Direct.
To see this PR running in Learner Dashboard:
aperture/add-UI-Plugin-Framework
npm install
andnpm run start
/src/uiPlugins/SideBarSlot/index.jsx
,src/uiPlugins/DemoPlugin/index.jsx
, andsrc/containers/Dashboard/index.jsx
Changes can also be found here in GitHub