msyavuz commented on code in PR #34144:
URL: https://github.com/apache/superset/pull/34144#discussion_r2205451326


##########
superset-frontend/packages/superset-ui-core/src/theme/Theme.tsx:
##########
@@ -160,7 +164,7 @@ export class Theme {
    * Dark mode should be specified via the algorithm property in the config
    */
   setConfig(config: AnyThemeConfig): void {
-    const antdConfig = normalizeThemeConfig(config);
+    const antdConfig: ThemeConfig = normalizeThemeConfig(config);

Review Comment:
   We don't have a standard for this, but i personally prefer implicit types in 
places like this where the function's return is already typed



##########
superset-frontend/packages/superset-ui-core/src/theme/Theme.tsx:
##########
@@ -169,7 +173,7 @@ export class Theme {
     };
 
     // First phase: Let Ant Design compute the tokens
-    const tokens = Theme.getFilteredAntdTheme(antdConfig);
+    const tokens: SharedAntdTokens = Theme.getFilteredAntdTheme(antdConfig);

Review Comment:
   Same discussion here



##########
superset-frontend/packages/superset-ui-core/src/theme/utils.ts:
##########
@@ -38,9 +40,8 @@ export function isSerializableConfig(
 
   if (algorithm === undefined) return true;
 
-  if (Array.isArray(algorithm)) {
+  if (Array.isArray(algorithm))

Review Comment:
   This is another personal preference but i think multiline if statements are 
better for these since refactoring and debugging is a bit easier.



-- 
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]

Reply via email to