diff --git a/web/layout.ts b/web/layout.ts index 2fe3dc4..f8e3bb6 100644 --- a/web/layout.ts +++ b/web/layout.ts @@ -1,9 +1,35 @@ import type { LayoutNode } from 'officerdev'; -// One panel. The game is one fixed-size stage and there is nothing to put beside it — a split here -// would be a second panel of empty space. +// Two panels stacked on the left, the game on the right — the same arrangement Atelier uses, and the one +// the rest of the app reads as "controls beside a surface". +// +// The left column is EMPTY on purpose. `appType: null` is a state of the framework rather than a missing +// app, and `normalizeLayout` allows it explicitly, so these survive the plugin's own allow-list instead of +// being rewritten to the fallback — which on a one-panel plugin would have rendered three Minesweepers. +// The screen is `locked`, so an empty panel here is a plain bordered box with no app picker. That is the +// intended look until something goes in them. +// +// The game panel keeps the id `minesweeper` it had when this was a single panel, so any per-panel state +// already keyed on it survives the change. export const defaultLayout: LayoutNode = { - type: 'panel', - id: 'minesweeper', - appType: 'minesweeper', + type: 'group', + id: 'minesweeper-root', + direction: 'horizontal', + children: [ + { + node: { + type: 'group', + id: 'minesweeper-side', + direction: 'vertical', + children: [ + { node: { type: 'panel', id: 'minesweeper-side-top', appType: null }, size: 50 }, + { node: { type: 'panel', id: 'minesweeper-side-bottom', appType: null }, size: 50 }, + ], + }, + // 25 rather than Atelier's 30: the board is drawn at a whole-number scale, so the panel losing a + // quarter of its width can drop it a step. 75% of a typical panel still clears 2x. + size: 25, + }, + { node: { type: 'panel', id: 'minesweeper', appType: 'minesweeper' }, size: 75 }, + ], };