Skip to manual
gluon

GOL language

Layout

A Layout stores where the designer places each node and which domains are collapsed.

Model author or developer

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.

FieldPresenceShape
algorithmOptionalenum: layered, force, radial, grid, manual
directionOptionalenum: LR, RL, TB, BT
groupByOptionalenum: domain, aggregate, segment, none
nodesOptionalobject
groupsOptionalobject
filtersOptionalobject
viewportOptionalobject

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)

GOL · YAML
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

Shell
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.

Contoso's procurement-overview Layout in the designer's YAML pane, with its validation status.
Contoso's procurement-overview Layout in the designer's YAML pane, with its validation status.