-
Notifications
You must be signed in to change notification settings - Fork 64
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
[BD-46] feat: add ability to dynamically load theme overrides #435
[BD-46] feat: add ability to dynamically load theme overrides #435
Conversation
Thanks for the pull request, @viktorrusakov! 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. |
251f96d
to
4542069
Compare
@@ -61,8 +62,28 @@ export default function AppProvider({ store, children }) { | |||
setLocale(getLocale()); | |||
}); | |||
|
|||
useEffect(() => { | |||
if (config.THEME_OVERRIDE_URL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: correctly handle dynamic THEME_OVERRIDE_URL
change (e.g., don't create new link
). Although I don't think it can change during runtime, should still consider such case.
const appContextValue = useMemo(() => ({ authenticatedUser, config, locale }), [authenticatedUser, config, locale]); | ||
|
||
if (!themeLoaded) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't show anything until theme override loaded to avoid showing content with default theme, before the overrides have been applied
Closed in favor of #440 |
@viktorrusakov 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. |
Description:
Adds ability to dynamically override theme with external CSS stylesheet. This is a part of design tokens work done in Paragon, see related ADR
Merge checklist:
frontend-platform
. This can be done by runningnpm start
and opening http://localhost:8080.module.config.js
file infrontend-build
.fix
,feat
) and is appropriate for your code change. Consider whether your code is a breaking change, and modify your commit accordingly.Post merge: