Context
Screenplay's theme construct declares compatible with <package>
relationships. Scene needs the runtime side: applying a theme's
styling/tokens to components from compatible packages, and surfacing the
compatibility warning when a profile pairs a theme with a package it
doesn't declare support for.
Proposal
- Implement theme application as a token/styling layer resolved against
the active ui profile's package list — Scene.React applies theme
Aurora's tokens to PrimeReact and Internal.Widgets components
specifically, not globally.
- Surface the same compatibility warning at both design time (Studio's
theme picker should filter to compatible themes before you can pick
wrong) and build time (Stage should warn on a profile that pairs an
incompatible theme/package combination).
- Theme switching must be a live re-resolution against the same running
profile — no reload — since this is required for the Studio gallery
preview (see UI starter/gallery issue) to feel instantaneous.
Open questions
- Token model shape (colors, spacing, typography, etc.) — needs its own
design pass, out of scope for this issue beyond confirming it's owned
here rather than per-renderer.
Dependencies
Depends on
Blocks
Part of the screen work — build order and full dependency map: #7
Implementation notes
Token application is Scene.React (it maps tokens onto real components from real packages). Compatibility validation is needed in C# too, because Stage must warn at build time (Cratis/Stage#39) and Studio must filter at design time (Cratis/StudioIssues#160) — so validate in the C# side next to Scene.Model and re-use the same rules in the engine, against a shared spec corpus. See #1.
The token model's own shape is explicitly out of scope here beyond confirming it is owned in Scene rather than per-renderer.
Context
Screenplay's
themeconstruct declarescompatible with <package>relationships. Scene needs the runtime side: applying a theme's
styling/tokens to components from compatible packages, and surfacing the
compatibility warning when a profile pairs a theme with a package it
doesn't declare support for.
Proposal
the active
ui profile's package list —Scene.Reactapplies themeAurora's tokens to PrimeReact and Internal.Widgets components
specifically, not globally.
theme picker should filter to compatible themes before you can pick
wrong) and build time (Stage should warn on a profile that pairs an
incompatible theme/package combination).
profile — no reload — since this is required for the Studio gallery
preview (see UI starter/gallery issue) to feel instantaneous.
Open questions
design pass, out of scope for this issue beyond confirming it's owned
here rather than per-renderer.
Dependencies
Depends on
theme, with declared package compatibility Screenplay#96 — thethemeconstruct and itscompatible withdeclarationsui profilepackage resolution engine #3 — tokens resolve against the active profile's package listBlocks
ui profileat build/run time) Stage#39 — build-time compatibility warningsui profileand theme configuration UI StudioIssues#160 — theme picker filtering reuses this compatibility check rather than duplicating itPart of the screen work — build order and full dependency map: #7
Implementation notes
Token application is
Scene.React(it maps tokens onto real components from real packages). Compatibility validation is needed in C# too, because Stage must warn at build time (Cratis/Stage#39) and Studio must filter at design time (Cratis/StudioIssues#160) — so validate in the C# side next toScene.Modeland re-use the same rules in the engine, against a shared spec corpus. See #1.The token model's own shape is explicitly out of scope here beyond confirming it is owned in Scene rather than per-renderer.