Skip to content

waygraph / LayoutOptions

Interface: LayoutOptions<G, D, R> ​

Defined in: src/engine/block/kinds/layout.ts:35

Type Parameters ​

G ​

G extends Record<string, LayoutLink>

D ​

D extends Record<string, PageMethodEntry>

R ​

R extends PageRead = PageRead

Properties ​

description? ​

optional description?: string

Defined in: src/engine/block/kinds/layout.ts:37


do? ​

optional do?: D

Defined in: src/engine/block/kinds/layout.ts:41

Its actions, by name: Layout.do.<name>, Methods (or () => Method, lazy) valid on every page it covers.


go? ​

optional go?: G

Defined in: src/engine/block/kinds/layout.ts:39

Its links, by name: Layout.go.<name>, Navs valid on every page it covers.


interrupts? ​

optional interrupts?: Record<string, { do: (page) => Promise<void>; when: string; }>

Defined in: src/engine/block/kinds/layout.ts:52

What can appear on any page it covers and get in the way (a cookie banner, a session warning), each handled where it shows up: when is the selector that shows it, do what to do. Whichever step is running isn't blocked, the run log says it fired, and the demo shows it.

Example ​

ts
interrupts: { cookies: { when: "#cookie-banner", do: (page) => page.getByRole("button", { name: "Accept" }).click() } }

name ​

name: string

Defined in: src/engine/block/kinds/layout.ts:36


on? ​

optional on?: readonly Checkpoint<string>[]

Defined in: src/engine/block/kinds/layout.ts:54

The pages it covers, when they aren't the ones under its folder (an app whose layout doesn't follow its addresses).


opens? ​

optional opens?: string

Defined in: src/engine/block/kinds/layout.ts:59

The button that opens it, for a layout that hides its links until opened (a burger menu, a user dropdown): a link clicks it first when its own link isn't showing.


read? ​

optional read?: (ctx) => R

Defined in: src/engine/block/kinds/layout.ts:43

What it shows, read on every page it covers: a reader per field, like a page's read. Its keys are Layout.read.<field>.

Parameters ​

ctx ​

ReadCtx

Returns ​

R


readAs? ​

optional readAs?: string

Defined in: src/engine/block/kinds/layout.ts:45

The name run logs and waygraph pilot read give what it reads (sidebar.links); the layout's name unless given.

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed