-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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(sdk): apply user interface color overrides to the sdk #42834
Conversation
enterprise/frontend/src/metabase-enterprise/whitelabel/lib/whitelabel.js
Outdated
Show resolved
Hide resolved
63ff183
to
ad91607
Compare
Codenotify: Notifying subscribers in CODENOTIFY files for diff fca30b1...c8f39d2. No notifications. |
|
export const SdkThemeProvider = ({ theme, children }: Props) => { | ||
const appColors = useSelector(state => | ||
getApplicationColors(getSettings(state)), | ||
); |
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.
The extra component is needed because of the provider structure, the call to useSelector
needs to be below ReduxProvider
but above ThemeProvider
selector state set global embedding colors rename the method
57d8a05
to
41e996b
Compare
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.
Nice!
(Waiting for the offset e2e fix by the QC folks to be merged - #42944) |
* feat(sdk): apply ui color overrides to the sdk selector state set global embedding colors rename the method * test(sdk): add unit test on color overrides
Closes #42705
Description
Applies the user interface colors in the enterprise appearance settings as the SDK's default value.
How to verify
test-sdk-colors
branch in the demo appAppProvider.tsx
, and ensure that everything incolors
are commented outbrand
color in the SDK, the sdk color should now take precedence.Caveat
Demo
Checklist