Skip to content

Release v4.26.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 04:11
396a03a

Scene gains sample-data packs: demo rows per shape that a design surface or preview shows, with a deterministic generator when no pack has them. The active pack is chosen once, on the application's UI profile. Closes part of the spec epic #96.

Added

  • Sample-data model in C# and TypeScript (and scene-model-shape.json): SampleDataPack, SampleShape, SampleShapeField, SampleFieldKind, SampleDataSelection and ScenePackage.sampleData (a Blueprint package ships its packs as sampleData/*.json).
  • UiProfile.sampleData selects the active pack once for the whole application (own or from a blueprint), plus the rare shape-to-read-model mappings and per-read-model bindings. There is no per-screen, slice or component selector; the preview strip's choice is the session-only sessionActivePack of the resolve context.
  • resolveSampleData / SampleDataResolver.Resolve implement the resolution order bound pack, UI profile active pack (or session override), blueprint default pack, generated data; nothing resolves unless isDesignOrPreview is true, so a Stage production build gets no sample data.
  • generateSample / SampleDataGenerator.Generate: a seeded xoshiro128** generator typed by field kind (ids, names, companies, emails, phones, cities, text, numbers, amounts, booleans, dates, enums), honouring nullability, min/max and pack locale (en-GB, en-US, nb-NO, sv-SE, de-DE), byte-identical in both engines for a seed.
  • validateSampleDataPack, validateSampleDataSelection, validateSampleDataPackages and describeSampleDataCatalog (C#: SampleDataValidation, SampleDataCatalogs) check what blueprint packages ship and build the selector content (generated, own, then each blueprint's group).
  • findDescriptorSampleRowLiterals / findTemplateSampleRowLiterals detect row literals in component descriptors and templates; verify-package-contents.js fails when sample data is packed outside sampleData/.
  • sample-data-resolution-fixtures.json, asserted independently by Engine.Specs/for_SampleData and engine/for_sampleData, and the documentation page blueprints/sample-data.md.