-
Notifications
You must be signed in to change notification settings - Fork 64
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: iframe-based experience plugins #235
Conversation
Codecov Report
@@ Coverage Diff @@
## master #235 +/- ##
==========================================
- Coverage 81.22% 74.95% -6.28%
==========================================
Files 38 48 +10
Lines 879 1058 +179
Branches 159 182 +23
==========================================
+ Hits 714 793 +79
- Misses 156 251 +95
- Partials 9 14 +5
Continue to review full report at Codecov.
|
b1de357
to
9bd3e5c
Compare
f18800a
to
be19bd6
Compare
287d9ed
to
d6299da
Compare
By including *.scss in sideEffects, we guarantee that imports of our SCSS files aren't getting tree shaken. This manifested as a problem in the example app, where the example/index.scss file wasn't showing up in the dev server. The import was getting tree shook (?) because it wasn't importing any specific export.
1. Adding a port to the .env.development file 2. Improving language on the ExamplePage. 3. Removing some CSS that shouldn't have made it in. 4. Adding an LTR direction to index.html 5. Removing plugin1.html, which was a test and shouldn't have been checked in.
This commit adds a variety of plugin classes for both host applications and plugin apps themselves.
This adds an "example-plugin-app" and also gives "example" its own package.json and build files. It separates out the test apps from the library in their parent directory, making them more independent.
This was just a scratch file where I was taking notes and shouldn't have been checked in.
Doing conflict resolution in package-lock.json is nearly impossible. Instead of trying, I ran `npm i` to install dependencies and let it fix package-lock.json itself. This is that generated file.
They needed to be re-created because of the node 16/18 upgrade. They were in the old format.
…n files Because this was an old branch we’re resurrecting, it suffered from some ugly version skew in its package-lock.json files and node_modules. It was breaking the dev build(s).
This way you can run the example dev servers from the root project directory.
Adjusting dependency arrays and ignoring a ‘forbidden’ prop type warning.
The code removed in this commit existed to load plugins via webpack module federation. It was never intended to be included in this version of plugins. We don’t intend to use module federation, and are instead investing in a micro-frontend framework like Piral.
d6299da
to
b943c18
Compare
Each app can have its own env.config.js because they’re independently run. We no longer need any of the .env files here. Since we’re no longer using .env as an input into the webpack process, we need to hardcode the port for the plugins app to 8081 so it doesn’t fall back to 8080 and conflict with the main example app.
9f9bf99
to
565afcd
Compare
This reverts commit 0e40872.
8784831
to
1f7f4c7
Compare
1f7f4c7
to
f69ff39
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #235 +/- ##
==========================================
- Coverage 83.17% 81.81% -1.37%
==========================================
Files 40 48 +8
Lines 1070 1204 +134
Branches 195 215 +20
==========================================
+ Hits 890 985 +95
- Misses 168 205 +37
- Partials 12 14 +2
☔ View full report in Codecov by Sentry. |
0607bec
to
3ec73f5
Compare
…fallback function
915a486
to
da6fd58
Compare
ae323d3
to
7a07c6a
Compare
Hey @davidjoy, What is the current status of this PR, is it ready to review and merge? |
@Mashal-m, this is now in progress via openedx/frontend-plugin-framework#2. I guess we can close this one. |
@Mashal-m what Adolfo said is correct! The only thing I'd ask is that the branch stays open until I'm done with the migration. I will close the branch once I am finished. |
Description:
This PR enables the ability to render plugin MFEs inside a host MFE using Plugin Slots and iFrames.
The additions and changes in this PR include:
example
app was also moved inside its own folder so that anexample-plugin
app could also run concurrently in order to see the plugin framework in use. (31 files).env
files withenv.config.js
Recommended Approach to Understanding
npm ci
in both example app directories before runningnpm run start
for each app.example/src/index
example/src/PluginsPage
example-plugin-app/src/index.jsx
example-plugin-app/src/PluginOne.jsx
(for error fallback)example-plugin-app/src/PluginTwo.jsx
Plugin.test.jsx
, include both Host and "Child"hooks
,constants
, andpluginConfigShape
Post merge: