diff --git a/docs/MODULE-GUIDE.md b/docs/MODULE-GUIDE.md index 5b7dc1c..d12e328 100644 --- a/docs/MODULE-GUIDE.md +++ b/docs/MODULE-GUIDE.md @@ -104,7 +104,7 @@ the app); its settings are kept for a later reinstall. Both schemas map field names to specs: ``` -{ "type": "string" | "text" | "number" | "boolean" | "switch" | "select" | "multiselect" | "color" | "password" | "endpoint", +{ "type": "string" | "text" | "number" | "boolean" | "switch" | "select" | "multiselect" | "template" | "color" | "password" | "endpoint", "label": "Shown next to the field", "default": , "group": "Section heading", // optional; see below @@ -128,7 +128,17 @@ default; the tile applies it as a CSS custom property — see `pco-plan`). `multiselect` is several picks from one list — the same `options` / `optionsRoute` as `select`, rendered as one switch per option and stored as an array of values. A saved value the list no longer offers stays checked and -marked, so nothing is dropped behind the admin's back (admin config only). +marked, so nothing is dropped behind anyone's back. In a tile's gear popover +it also takes `columns` (2–4) and `allByDefault: true`: a tile that has never +chosen shows every option on and saves nothing until someone flips one, so +options that turn up later are on as well (give it no `default` then). +`select` and `multiselect` may use `optionsRoute` in `instanceSchema` too — +the popover GETs `/api/modules/` like the admin page does. + +`template` (tile settings) is a text with placeholders, built by dragging or +clicking the variables the module offers into it: `"variables": [ { "value": +"{series}", "label": "Series" }, … ]`. Keep `help` to the joining rules; the +chips carry the names. `text` is a multi-line string — a `