openedx / frontend-platform

A framework for Open edX micro-frontend applications.
http://openedx.github.io/frontend-platform
GNU Affero General Public License v3.0
32 stars 63 forks source link

feat: UI slot component with the basic config #662

Closed johnvente closed 6 months ago

johnvente commented 6 months ago

Description:

This PR the basic PluggableComponent which will allow to reuse it where we need it and an util called contextFactory will help us to have a context provider that we will use thro a reducer to share data between components or even PluggableComponent if you rather. The main idea is to have those to be reusable in any MFE that way we don't need to setup them.

This PR depends on this one: https://github.com/openedx/frontend-build/pull/518

How to test it

  1. Install dependencies
    nvm use && npm install
  2. Start the frontend-build
    npm start
  3. You should be able to see this following plugin which is only for test purpuses: Screen Shot 2024-03-13 at 1 32 01 PM

Merge checklist:

Post merge:

openedx-webhooks commented 6 months ago

Thanks for the pull request, @johnvente! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

This is currently a draft pull request. When it is ready for our review and all tests are green, click "Ready for Review", or remove "WIP" from the title, as appropriate.

codecov[bot] commented 6 months ago

Codecov Report

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

Project coverage is 83.98%. Comparing base (441800f) to head (b72e103).

Files Patch % Lines
src/react/utils/contextFactory/withProvider.jsx 33.33% 4 Missing :warning:
src/react/PluggableComponent/MultiplePlugins.jsx 92.10% 3 Missing :warning:
src/react/PluggableComponent/index.jsx 91.89% 3 Missing :warning:
src/react/utils/contextFactory/index.js 81.81% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #662 +/- ## ========================================== + Coverage 83.50% 83.98% +0.47% ========================================== Files 40 45 +5 Lines 1073 1180 +107 Branches 197 218 +21 ========================================== + Hits 896 991 +95 - Misses 165 177 +12 Partials 12 12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

openedx-webhooks commented 6 months ago

@johnvente Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.