mistercrunch commented on code in PR #34182:
URL: https://github.com/apache/superset/pull/34182#discussion_r2220863906


##########
superset-frontend/src/dashboard/containers/DashboardPage.tsx:
##########
@@ -215,6 +222,34 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: 
PageProps) => {
     return () => {};
   }, [css]);
 
+  // Apply dashboard theme when dashboard loads
+  useEffect(() => {
+    const applyDashboardTheme = async () => {
+      if (dashboard?.theme?.id) {
+        try {
+          const response = await SupersetClient.get({
+            endpoint: `/api/v1/theme/${dashboard.theme.id}`,
+          });
+          const themeConfig = JSON.parse(response.json.result.json_data);
+          themeContext.setTemporaryTheme(themeConfig);

Review Comment:
   yes we had a product conversation about this. I think we decided to scope it 
to only the dashboard areas (navbar shouldn't change). I see to change things 
here so it only injects the dashboard theme to that section of the page ... TODO



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to