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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8916ccc
feat: add ability to dynamically load theme overrides
adamstankiewicz May 20, 2023
e13007e
fix: remove duplicate import
adamstankiewicz May 27, 2023
288e63a
docs: update docs
adamstankiewicz May 29, 2023
a488c9d
chore: clean up package-lock
adamstankiewicz Jun 1, 2023
f0d6ee2
fix: brand overrides
adamstankiewicz Jun 5, 2023
b0ecb2d
feat: support dark mode
dcoa Jul 21, 2023
eb0dc3a
fix: update dependenices and AppProvider test
dcoa May 8, 2024
8c4d142
style: fix variable name and funtion
dcoa May 10, 2024
327b66e
test: add useParagonTheme test
dcoa May 11, 2024
7e92de0
docs: update scope of paragon and brand for openedx
dcoa May 14, 2024
a76089a
refactor: allow multiple replacement in version replacement
dcoa May 17, 2024
b376344
refactor: update webpack dev config
dcoa May 22, 2024
e137d3f
refactor: avoid duplicated links if the theme varian is preloaded
dcoa May 23, 2024
3921525
refactor: update useParagonTheme when some variables are missing
dcoa May 23, 2024
253bb06
test: add new test csse for useParagonThemeCore
dcoa May 23, 2024
4aaee2c
refactor: use modules for config file
dcoa May 23, 2024
5d89032
fix: fallback url
dcoa May 28, 2024
ebde044
style: fix imports order
dcoa May 28, 2024
0335425
refactor: create isEmptyObject and fallbackThemeUrl utils
dcoa May 28, 2024
bb13cad
test: refactor testing fot app provider, theme core hook, theme varia…
dcoa May 28, 2024
f847358
docs: improve themening documentation
dcoa Jun 3, 2024
4d95237
chore: update dependencies and regenerate package-lock
dcoa Jun 26, 2024
a21a61d
temp: add dist folder for testing purposes
dcoa Jul 22, 2024
3ad1b02
refactor: allow env PARAGON_THEME_URLS definition
dcoa Dec 2, 2024
8b321f1
test: regenerate dist folder for testing
dcoa Dec 2, 2024
0b85f5e
refactor: update paragon version and scss to use css variables
dcoa Jan 28, 2025
e0702ea
test: update dist folder for testing
dcoa Jan 28, 2025
e460dbf
refactor: clean up unnecessary changes
dcoa Feb 4, 2025
3c93bb9
refactor: create a function to parse the JSON env for paragon
dcoa Feb 4, 2025
b342e0f
refactor: use getConfig diractly in useParagonUrls
dcoa Feb 5, 2025
4304681
refactor: validate paragonUrlsJson and remove direct module export fo…
dcoa Feb 6, 2025
b595e24
test: increase coverage useParagonTheme
dcoa Feb 6, 2025
0fd1a8e
refactor: change "loaded" for "complete" to reference when the link p…
dcoa Feb 7, 2025
8ef3a89
test: increase coverage for theme variants
dcoa Feb 9, 2025
ef07e00
test: increase test coverage
dcoa Feb 11, 2025
5fff65a
refactor: log error message when the JSON has a syntax error
dcoa Feb 11, 2025
29621c7
docs: enhance JSDocs for the paragon functions
dcoa Feb 12, 2025
34a2363
docs: improve readability of important highlights in theming.md
dcoa Feb 20, 2025
f7bdb5a
fix: replace onLoad with onComplete
dcoa Feb 20, 2025
3ce9474
fix: configure fallback urls when the PARAGON_THEME_URLS has a error …
dcoa Feb 25, 2025
e3359fe
test: update code to remove react-hooks
dcoa Feb 25, 2025
d9ed42c
refactor: remove if/else to clean code in useParagonThemeCore
dcoa Feb 26, 2025
f2246f8
test: update dist test folder with latest changes
dcoa Mar 3, 2025
250ee46
revert: delete dist folder
dcoa Feb 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
IGNORED_ERROR_REGEX=
MFE_CONFIG_API_URL=
APP_ID=
SUPPORT_URL=https://support.edx.org
SUPPORT_URL=https://support.edx.org
PARAGON_THEME_URLS={}
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ IGNORED_ERROR_REGEX=
MFE_CONFIG_API_URL=
APP_ID=
SUPPORT_URL=https://support.edx.org
PARAGON_THEME_URLS={}
Binary file added docs/how_tos/assets/paragon-theme-loader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
261 changes: 261 additions & 0 deletions docs/how_tos/theming.md

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions example/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
@import "@edx/brand/paragon/fonts";
@import "@edx/brand/paragon/variables";
@import "@openedx/paragon/scss/core/core";
@import "@edx/brand/paragon/overrides";
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints.css" as paragonCustomMediaBreakpoints;
Loading