Where it goes
Contoso keeps procurement-overview in layouts/procurement-overview.yaml. The loader reads every YAML file under the package root, so folders are a convention you can change. Name it in lowercase kebab-case. The name must be unique among the package's Layout resources.
Limits
Layouts are left out of the content hash and compatibility diffs. Moving a type on the canvas still needs edit permission on that type.
Fields
The keys under spec. Nested shapes follow LayoutSpec in the GOL JSON Schema.
| Field | Presence | Shape |
|---|---|---|
algorithm | Optional | enum: layered, force, radial, grid, manual |
direction | Optional | enum: LR, RL, TB, BT |
groupBy | Optional | enum: domain, aggregate, segment, none |
nodes | Optional | object |
groups | Optional | object |
filters | Optional | object |
viewport | Optional | object |
Syntax and rules
The examples are fragments. Put them in a package next to the resources they reference. A ... stands for a CEL expression you write yourself.
16. Layout (designer state)
kind: Layout
metadata: { name: procurement-overview }
spec:
algorithm: layered # layered | force | radial | grid | manual
direction: LR
groupBy: domain
nodes: { procurement.Contract: { pos: [420, 180], pinned: true, collapsed: false } } # pos, not x/y: `y` is a YAML 1.1 boolean (GLN-E005)
groups: { procurement: { collapsed: false, color: "#7C5CFF" } }
filters: { status: [active, draft], kinds: [ObjectType, Interface] }
viewport: { pos: [0, 0], zoom: 0.8 }
Excluded from contentHash, from compatibility diffs and from review requirements.
Check your package
gluon validate examples/contoso
gluon test examples/contoso
validate reports each problem with a GLN code and its place in the file. test runs the package's Test resources. See the language guide and the diagnostics.
