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 64 forks source link

feat: adds support for loading external theme CSS for MFEs #689

Open dcoa opened 6 months ago

dcoa commented 6 months ago

Description:

This PR updates the original one https://github.com/openedx/frontend-platform/pull/440 closer to the master branch and adds some extra tests.

Please read the original PR for additional context.

[!WARNING] The dist folder is included in the PR for testing purposes and will be removed before the merge.

Merge checklist:

Post merge:

openedx-webhooks commented 6 months ago

Thanks for the pull request, @dcoa!

What's next?

Please work through the following steps to get your changes ready for engineering review:

:radio_button: Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

:radio_button: Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

:radio_button: Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

:radio_button: Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/committers-frontend. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

:bulb: As a result it may take up to several weeks or months to complete a review and merge your PR.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 83.90093% with 52 lines in your changes missing coverage. Please review.

Project coverage is 83.64%. Comparing base (bc9c233) to head (837858e).

Files Patch % Lines
src/react/hooks/paragon/useParagonThemeVariants.js 81.57% 19 Missing and 2 partials :warning:
src/react/hooks/paragon/useParagonThemeCore.js 80.95% 15 Missing and 1 partial :warning:
src/react/hooks/paragon/utils.js 78.78% 7 Missing :warning:
src/react/hooks/paragon/useParagonTheme.js 84.37% 4 Missing and 1 partial :warning:
src/react/reducers.js 84.61% 2 Missing :warning:
src/react/hooks/paragon/useParagonThemeUrls.js 96.77% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #689 +/- ## ========================================== + Coverage 83.41% 83.64% +0.23% ========================================== Files 40 48 +8 Lines 1073 1388 +315 Branches 197 290 +93 ========================================== + Hits 895 1161 +266 - Misses 166 211 +45 - Partials 12 16 +4 ```

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

PKulkoRaccoonGang commented 5 months ago

@dcoa I'm getting an error during build related to the env.config.js file

SyntaxError: Unexpected token 'export'

I tried to solve it by changing the export to module.exports = { config }; I succeeded, but the content of the example application is not rendered on http://localhost:8080.

Have you encountered such a problem?

dcoa commented 5 months ago

@PKulkoRaccoonGang this is related to frontend-build changes, I'm checking right now

This line is making that the app is not rendering in frontend-platform https://github.com/openedx/frontend-build/pull/546/files#diff-22e13ddf245ea4fa81ca4d686dddf46fa9cbf70fbbff99991cccbf0c8ff82316R175

If you remove it, you will be able to see the app.

Update

I made an update to webpack dev config for example app and is working now.

arbrandes commented 1 month ago

@davidjoy, this is a doozy to keep an eye on.

davidjoy commented 3 weeks ago

Sure is. It looks like it was temporary, but just to explicitly note it: the dist folder has been checked in in this PR. We need to remember to remove that before merging.