Skip to content

Conversation

@jsnwesson
Copy link
Member

This PR extracts the default component logic from env.config.js to live in the Host MFE, and thus wrapped by the Plugin Slot. This is necessary in order to ensure that core functionality remains in the Host MFE rather than defined in a JS config, which would have impacted the developer experience for engineers who weren't planning on using the plugin slot.

The primary changes include:

  • keepDefault boolean replaces default_contents array in JS config
  • Default Content has a priority of 50 so any plugins can be inserted before/after
  • Updated example apps to render default content accordingly
  • Added Plugin Slot example for when keepDefault is set to false
  • Default Content section of README is updated

APER-3281

@codecov
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.53%. Comparing base (1fe6e1b) to head (2bce431).
Report is 2 commits behind head on master.

Files Patch % Lines
src/plugins/PluginSlot.jsx 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #41      +/-   ##
==========================================
+ Coverage   94.57%   96.53%   +1.95%     
==========================================
  Files          10       10              
  Lines         166      173       +7     
  Branches       32       35       +3     
==========================================
+ Hits          157      167      +10     
+ Misses          7        5       -2     
+ Partials        2        1       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@MaxFrank13 MaxFrank13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Thanks for getting all this done. I just had a handful of nit picks. I'm going to approve now but am happy to discuss anything further 👍

* the original test was going to hide defaultContent, but that is already accomplished with keepDefault functionality
@jsnwesson jsnwesson merged commit 31d16bb into master Mar 12, 2024
@jsnwesson jsnwesson deleted the jwesson/revert-default-contents branch March 12, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants