package file→ .shtukbase/packages/lenses/kit/templates/README.md
kit/templates/README.md
36 lines, 2.4 KB.
- # Templates of a layer's live lenses
- The shells that the standard's data generators put into a base (`--shells`). Copies in a base are not edited by hand:
- change the template here and rerun the generator.
- | Template | Where it is put | Data | Generator (shtukbase-standard) |
- |---|---|---|---|
- | `contour.html` | `/<layer>/contours/<type>.html` | `/lib/<layer>/contours.data.js` (`window.SHTUKS_LAYER.contours`) | `lab/lenses/build_contour_data.py` |
- | `overview.html` | `/<layer>/overview.html` | `/lib/<layer>/overview.data.js` (`window.SHTUKS_LAYER.overview`) | `lab/lenses/build_overview_data.py` |
- Commands for a base in `shtuks/`:
- ```
- python3 <standard-repo>/lab/lenses/build_contour_data.py --root shtuks --all --shells
- python3 <standard-repo>/lab/lenses/build_overview_data.py --root shtuks --all --shells
- node <lenses-repo>/bin/shtukbase-lenses.js build --root shtuks
- ```
- **A contour lens** is a board: the columns are the contour's states in order, the cards are the collection's records.
- On a card, the transition gate (the `needs` fields with a mark of whether they are filled in) and the time in the state from git.
- Longer than the state's `maxDays` — the card is highlighted. A cross-cutting contour (`spans`, stages with `includes`) is
- the same template: the columns are stages, on the card the layer's source state.
- **A layer overview** — records by collection, by contour — how many in each state, what is stuck,
- open questions and the owner's gates for the layer, a link to `ontology/graph.html` if it exists.
- Decisions "conditionally" (the specification does not set them):
- - Being stuck is computed by the lens from the current time: the data holds the moment of entering the state (`since`)
- and the norm; so the lens does not go stale between rebuilds.
- - A cross-cutting contour lives in the layer `base`: its shell is `/base/contours/<name>.html`.
- - In the old layout (`/contours/<layer>-<type>.md`) the shells are put in the same place as in the new one,
- so that lens addresses do not change after a move.
- - Everything auxiliary lies in one folder `lib/` in the base root: the set (`kit.js`, `kit.css`, in git),
- the base's data (`data.js`, `bodies.js`, not in git) and the layers' data files (`lib/<layer>/*.data.js`, in git).
- The shell links them by a relative path (`{{lib}}` — `../lib` for an overview, `../../lib` for a contour),
- so a lens opens both in Shtukbase and from disk by a double click.