Add UI starter package/theme resolution engine - #13
Merged
Conversation
A packaged, versioned UI starting point: a package list, the themes it ships as compatible choices, and a gallery of sample screens - the data shape #6's starters and Studio's new-project scaffolding build on. Mirrored in both Cratis.Scene.Model and @cratis/scene.model, with the shared shape manifest updated to keep them in parity.
StarterProfileBuilder builds the sandboxed UiProfile a UiStarter's gallery boots through, scoped to exactly the starter's own package list, so Studio can run the gallery as a real working mini-app rather than a simulated preview. StarterThemeValidation reuses ThemeCompatibility to find which of a starter's declared themes are actually incompatible with its own packages - a starter is versioned per package combination, so this is the same compatibility gap the theme engine already surfaces for a UiProfile. Both are asserted against a shared ui-starter-fixtures.json corpus so the upcoming TypeScript twin cannot drift from this implementation.
TypeScript twin of the C# starter engine: buildStarterProfile mirrors StarterProfileBuilder, incompatibleStarterThemes mirrors StarterThemeValidation. Both are asserted against the same shared ui-starter-fixtures.json corpus as the C# implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
UiStartermodel type: a packaged, versioned UI starting point bundling a package list, compatible themes, and a gallery of sample screen names (UI starters (kits) and their sample gallery #6)StarterProfileBuilder/buildStarterProfile: builds the sandboxedUiProfilea starter's gallery boots through, scoped to exactly its own package list (UI starters (kits) and their sample gallery #6)StarterThemeValidation/incompatibleStarterThemes: finds which of a starter's declared themes are incompatible with its own packages, reusing the theme compatibility engine (UI starters (kits) and their sample gallery #6)