Skip to content
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: adds support for loading external theme CSS for MFEs #689

Merged
merged 44 commits into from
Mar 3, 2025

Conversation

dcoa
Copy link
Contributor

@dcoa dcoa commented May 10, 2024

Description:

This PR updates the original one #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.
  • The PR should update the Paragon version once the official release is launched.

Merge checklist:

  • Consider running your code modifications in the included example app within frontend-platform. This can be done by running npm start and opening http://localhost:8080.
  • Consider testing your code modifications in another local micro-frontend using local aliases configured via the module.config.js file in frontend-build.
  • Verify your commit title/body conforms to the conventional commits format (e.g., fix, feat) and is appropriate for your code change. Consider whether your code is a breaking change, and modify your commit accordingly.

Post merge:

  • After the build finishes for the merged commit, verify the new release has been pushed to NPM.

@openedx-webhooks
Copy link

openedx-webhooks commented May 10, 2024

Thanks for the pull request, @dcoa!

This repository is currently maintained by @openedx/committers-frontend.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

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

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 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.


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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

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

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label May 10, 2024
Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 96.77419% with 11 lines in your changes missing coverage. Please review.

Project coverage is 86.70%. Comparing base (4e72a7b) to head (250ee46).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/config.js 44.44% 4 Missing and 1 partial ⚠️
src/react/hooks/paragon/useParagonThemeCore.js 97.59% 2 Missing ⚠️
src/react/hooks/paragon/useParagonThemeVariants.js 98.23% 2 Missing ⚠️
src/react/reducers.js 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #689      +/-   ##
==========================================
+ Coverage   83.36%   86.70%   +3.34%     
==========================================
  Files          40       48       +8     
  Lines        1070     1392     +322     
  Branches      197      295      +98     
==========================================
+ Hits          892     1207     +315     
- Misses        166      172       +6     
- Partials       12       13       +1     

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

@dcoa dcoa force-pushed the dcoa/design-tokens-support branch from aee582b to e81b549 Compare May 11, 2024 00:23
@dcoa dcoa requested a review from brian-smith-tcril May 11, 2024 00:49
@dcoa dcoa changed the title [WIP] feat: adds support for loading external theme CSS for MFEs feat: adds support for loading external theme CSS for MFEs May 11, 2024
@dcoa dcoa requested a review from adamstankiewicz May 11, 2024 00:49
@dcoa dcoa force-pushed the dcoa/design-tokens-support branch from 5b4c843 to ed293e3 Compare May 14, 2024 00:44
@PKulkoRaccoonGang
Copy link
Contributor

@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
Copy link
Contributor Author

dcoa commented May 21, 2024

@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.

Copy link
Contributor

@PKulkoRaccoonGang PKulkoRaccoonGang left a comment

Choose a reason for hiding this comment

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

@dcoa This looks great! I have already started working on Update openedx/frontend-app-discussions. I left a few questions about the operation of some features and the code in general.

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

Overall this is looking great! I left a suggestion to clarify the documentation is referring to design tokens, and a few comments noting PRs that need to land before this can.

Thank you so much for this!

dcoa and others added 27 commits March 4, 2025 08:43
@dcoa dcoa force-pushed the dcoa/design-tokens-support branch from ff8c977 to 250ee46 Compare March 3, 2025 22:04
@brian-smith-tcril brian-smith-tcril merged commit 98a878d into openedx:master Mar 3, 2025
6 checks passed
@xitij2000
Copy link

Great to see this merge! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

9 participants