Open vacarsu opened 3 years ago
Added a way to add additional keys to be validated for custom themes.
With these changes we can now validate once during compile. We shouldn't need to validate in the viewport anymore. Is my thinking here correct?
Love the Palettte module. lets do a call so you can walk me through the rest. Is a bit much to wrap my head around.
Okay, made the changes you requested. Moved the functions with logic out of the macro, and it will now fallback to Scenic.Themes as a default if no themes config is set.
Description
The pull request adds support for registering library themes, similar to static assets.
Themes are now registered and validated within scenic from
Scenic.Themes
.Motivation and Context
Before the theme module was on
Scenic.Primitive.Style.Theme
, which felt like it would only be used in the context of primitives/components. However, it was imported everywhere that theme validation was needed, and had all the themes directly on that module. This means Scenic would not be able to validate custom themes that were not a map.Also, there were times when scenic would pass around
:dark
,:light
atoms, you had to know this ahead of time and know to validate or get the preset viaScenic.Primitive.Style.Theme
. With all themes now registered through a single module, you can now fetch presets and validate any theme fromScenic.Themes
.Types of changes
Todos