msyavuz commented on code in PR #34273:
URL: https://github.com/apache/superset/pull/34273#discussion_r2228101407
##########
superset-frontend/src/theme/tests/ThemeController.test.ts:
##########
@@ -53,7 +61,7 @@ const DEFAULT_THEME = {
colorSuccess: '#3c7c1b',
colorWarning: '#dc9811',
},
-};
+} as AnyThemeConfig;
Review Comment:
Shouldn't we do the typing properly here instead of the assertion?
##########
superset-frontend/src/theme/ThemeController.ts:
##########
@@ -115,14 +123,14 @@ export class ThemeController {
bootstrapDefaultTheme,
bootstrapDarkTheme,
bootstrapThemeSettings,
- hasBootstrapThemes,
+ hasCustomThemes,
Review Comment:
Why are we changing this?
##########
superset-frontend/src/theme/ThemeController.ts:
##########
@@ -47,6 +47,16 @@ const STORAGE_KEYS = {
const MEDIA_QUERY_DARK_SCHEME = '(prefers-color-scheme: dark)';
+export interface SupersetThemeConfig {
+ theme_default: AnyThemeConfig;
+ theme_dark?: AnyThemeConfig;
+ theme_settings?: {
+ enforced?: boolean;
+ allowSwitching?: boolean;
+ allowOSPreference?: boolean;
+ };
+}
Review Comment:
we can install the core package in embedded-sdk itself and use the type
there if we have this ui/core. Let's move this and use the type.
##########
superset-frontend/src/theme/tests/ThemeController.test.ts:
##########
@@ -65,8 +73,8 @@ const DARK_THEME = {
colorSuccess: '#3c7c1b',
colorWarning: '#dc9811',
},
- algorithm: ThemeMode.DARK,
-};
+ algorithm: ThemeAlgorithm.DARK,
+} as AnyThemeConfig;
Review Comment:
Same here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]