mistercrunch commented on issue #20159:
URL: https://github.com/apache/superset/issues/20159#issuecomment-2701813119

   The more I think about it, the more I think sticking with antd tokens and 
implementing good namespacing on top is the most flexible and extensible way to 
go. Especially if the namespacing can be composed. 
   
   Generally we can start with the raw `styled` and `useTheme` everywhere, and 
inject namespace(s) where deviations from the base theme are needed. 
   
   So say take the Table visualization for instance:
   - first implement usage of the new set of tokens (fontFamily, colorText, ...)
   - if/when customizations are needed, create a namespace (move from 
`useTheme` to `useTheme('TableViz')`)
   - users can now override whichever token they want for TableViz using 
ThemeConfig semantics
   
   About composition, if someone says "I want to set fontFamily for all 
visualizations in one place", then we go and make sure all visualization call 
`useTheme('Viz')`, and for TableViz, we set it to `useTheme(['Viz', 
'TableViz'])`. Eventally can make sure each visualization uses `Viz` 
namespacing and something specific to that viz type.


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