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

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Commits on Jun 26, 2024

  1. feat: add ability to dynamically load theme overrides

    feat: adds support for loading external theme CSS for MFEs
    
    Introduces `useAppTheme` in `AppProvider` to load/inject `<link>` elements for the core theme CSS and any theme variant CSS into the HTML document. Exposes the app theme state and a way to mutate it to consumers via `AppContext`.
    
    fix: handle missing theme config
    
    fix: add env vars to env files
    
    fix: remove unused code
    
    chore: wip commit
    
    fix: prefer runtime config for paragon theme
    
    fix: rebase on master and resolve package conflicts
    
    fix: revert to original webpack.dev.config config
    
    chore: clean up unnecessary comment line
    
    fix: grammar
    
    Co-authored-by: Adolfo R. Brandes <[email protected]>
    2 people authored and dcoa committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    8a28be3 View commit details
    Browse the repository at this point in the history
  2. fix: remove duplicate import

    chore: refresh package-lock.json to lockfileVersion 3
    
    fix: clean up link nodes in document head when no longer needed
    
    fix: fallback to locally installed core and light theme css urls
    
    docs: update to docs
    
    chore: update docs about
    
    fix: expose setThemeVariant
    adamstankiewicz authored and dcoa committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    4727a2f View commit details
    Browse the repository at this point in the history
  3. docs: update docs

    fix: rebase with master and update based on PARAGON changes
    
    chore: remove support for env vars config for paragon dynamic theming
    adamstankiewicz authored and dcoa committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    0eb957e View commit details
    Browse the repository at this point in the history
  4. chore: clean up package-lock

    fix: updates
    
    fix: one more update
    
    fix: refresh package-lock.json
    
    fix: refresh package-lock.json pt2
    
    fix: updates
    
    fix: update package-lock.json
    
    fix: make it theme variant agnostic
    
    docs: update howto theming guide
    
    fix: ensure app loads without styles if the PARAGON_THEME_URLS and fallback urls all fail to load
    
    fix: ensure fallback theme links are removed if they also error
    
    docs: add link to mfe runtime config api adr
    
    fix: don't attempt to load paragon css urls if PARAGON_THEME_URLS is absent
    adamstankiewicz authored and dcoa committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    02b9b08 View commit details
    Browse the repository at this point in the history
  5. fix: brand overrides

    docs: fix code example
    
    docs: add missing comma
    
    docs: update how to
    adamstankiewicz authored and dcoa committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    17c0b8c View commit details
    Browse the repository at this point in the history
  6. feat: support dark mode

    chore: update package-lock.json
    
    chore: update package-lock.json take 2
    
    chore: remove console.log statements
    
    fix: ignore system preference change when theme variant set in localstorage
    
    chore: add tests for updates to AppProvider
    
    chore: update react-intl to pass peer dependencies after pinning all deps
    
    chore: split hooks.js up into separate files and begin some related tests
    
    test: add testing to useParagonTheme hooks (openedx#514)
    
    * test: add testing to useParagonThemeCore
    * test: add test to useThemeVariants hook
    * fix: Paragon definition and remove onload mock
    * test: change test message to be clear
    dcoa committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    cd88107 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b64c154 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d934ec7 View commit details
    Browse the repository at this point in the history
  9. test: add useParagonTheme test

    dcoa committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    d170103 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    89104fd View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0445ee2 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    33aba81 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5dd20a1 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ba3f639 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4c0ea76 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2024

  1. Configuration menu
    Copy the full SHA
    7ea2c6a View commit details
    Browse the repository at this point in the history
  2. fix: fallback url

    dcoa committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    65144e0 View commit details
    Browse the repository at this point in the history
  3. style: fix imports order

    dcoa committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    a269c5d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4e66dc4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b2bfe7c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2e1da80 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8f84e1c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ae5b53f View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2024

  1. Configuration menu
    Copy the full SHA
    3576ee7 View commit details
    Browse the repository at this point in the history