mistercrunch commented on PR #34182:
URL: https://github.com/apache/superset/pull/34182#issuecomment-3117987315

   > Currently we set some default tokens in 
packages/superset-ui-core/src/theme/Theme.tsx But they are not visible in the 
ui for the theme and i am not sure if they are applied to database either. 
Should we move them to default config options instead?
   
   The theme constructor is (AFAIK) deterministic (well kinda), meaning when 
you set your theme to `{algorithm: "dark"}`, as it gets created, will go 
through its construction, and defaults get applied, so the defaults here 
https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/theme/Theme.tsx#L73-L101
 will get applied. Now if you were to pass an override like `{algorithm: 
"dark": token: { brandLogoUrl: "{some_url}" }}`, it'll override the default, 
and generated tokens will end up the same, except for that one. Now across 
versions of Superset where defaults might change, the "compiled" theme might 
change as defaults change, but I'm pretty sure that's what we want in most 
(all?) cases.


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