marunrun opened a new issue, #35167:
URL: https://github.com/apache/superset/issues/35167

   ### Bug description
   
   When  i using the embedded SDK, got an error.
   ```
   useTheme() could not find a ThemeContext. The <ThemeProvider/> component is 
likely missing from the app.
       at useTheme 
(webpack-internal:///./packages/superset-ui-core/src/theme/index.tsx:61:11)
       at Loading 
(webpack-internal:///./packages/superset-ui-core/src/components/Loading/index.tsx:64:65)
   ```
   
https://github.com/apache/superset/blob/dced2f8564ce65161312ee579dc47359958d4c15/superset-frontend/packages/superset-ui-core/src/components/Loading/index.tsx#L61-L71
   
   
https://github.com/apache/superset/blob/dced2f8564ce65161312ee579dc47359958d4c15/superset-frontend/src/embedded/index.tsx#L93-L102
   
   Because the latest Loading used useTheme.
   
   But in embedded applications, the Loading component is used as a fallback 
for Suspense, but it is located outside of EmbeddedContextProviders, resulting 
in the inability to access the theme context.
   
   ### Screenshots/recordings
   
   <img width="2510" height="906" alt="Image" 
src="https://github.com/user-attachments/assets/e556d7ab-64fe-4636-af5f-01a90c3d4c4d";
 />
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


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