rusackas commented on PR #36389:
URL: https://github.com/apache/superset/pull/36389#issuecomment-3608315795

   I'm a little unhappy that our theme objects will get bigger and bigger with 
this kind of change. Soon the SupersetTheme won't be anything we can properly 
document or build UI around, and we might even overflow LocalStorage at some 
point. It'll contain tokens for every library we want to theme (AntD, ECharts, 
AGGrid, etc) and will only balloon over time. It seems like we should just keep 
a minimal set of Superset Theme tokens, and then it's up to the chart 
implementation to pull the right values. 
   
   If we want to allow extensions for HighCharts/Plotly/whatever, this problem 
compounds, and the SupersetTheme will be a giant hairball. 
   
   I would do it more like AntD expects this to work, e.g.:
   
   ```
   <ThemeProvider theme="yourMainTheme">
     Some Dashboard
       <ThemeProvider theme="yourPieChartTheme">
          Pie Chart
   ```
   Then, you could customize any chart, and even add more of these Theme 
insertion points wherever we want to "break the mold" from the base style. The 
SupersetTheme will remain small (and typeable/documentable, if those are 
words), and we gain this kind of "override" capability anywhere we need it, for 
any UI library.


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