|
| 1 | +# Editor gallery |
| 2 | + |
| 3 | +<!-- Generated by tests/Schema.Editor.UITests/Gallery. Edit GalleryCatalog.cs, not this file. --> |
| 4 | + |
| 5 | +The Schema editor as it draws today, working on a small sample schema for a game, staged and photographed headlessly by the UI test harness. The pictures are regenerated on every successful build of `main`, so they show the current editor. |
| 6 | + |
| 7 | +## Starting a schema |
| 8 | + |
| 9 | +The editor opens on whatever was open last, or on nothing. The File menu creates, opens and saves `.schema.json` files and keeps the recent ones to hand. |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +## Editing a class |
| 14 | + |
| 15 | +The trees on the left hold the schema's classes, enums, data sources and code generators. Choosing a class opens its members as a grid: each one named, typed and described, and reordered or removed from its row. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Member metadata |
| 20 | + |
| 21 | +Behind each member is what its type cannot say: the unit it is measured in, the range it may take, its default, how it is interpolated, and how it travels over a network. |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +## Choosing a type |
| 26 | + |
| 27 | +A member's type is picked from the built-in types and everything the schema declares, searchable by name. |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +## Choosing a unit |
| 32 | + |
| 33 | +Units come from ktsu.Semantics.Quantities rather than a list kept here, each offered by name and symbol. |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +## Editing an enum |
| 38 | + |
| 39 | +An enum is a named set of values any class can use as a member's type. |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +## Code generators |
| 44 | + |
| 45 | +A code generator writes the schema out as source in a target language, into a directory relative to the schema file. |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +## Class graph |
| 50 | + |
| 51 | +Every class and enum as a node, with an edge for each member that refers to another, laid out by a force simulation. |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +## Diagnostics |
| 56 | + |
| 57 | +The schema is validated as it is edited. The tab carries the counts, and each issue names the element it is about; clicking one selects that element. |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +## Themes |
| 62 | + |
| 63 | +The editor takes its colours from ktsu.ThemeProvider, and remembers the theme chosen in the browser. |
| 64 | + |
| 65 | + |
| 66 | + |
0 commit comments