ShtukbaseStandard
package file→ .shtukbase/packages/lenses/kit/templates/README.md

kit/templates/README.md

36 lines, 2.4 KB.

  1. # Templates of a layer's live lenses
  2. The shells that the standard's data generators put into a base (`--shells`). Copies in a base are not edited by hand:
  3. change the template here and rerun the generator.
  4. | Template | Where it is put | Data | Generator (shtukbase-standard) |
  5. |---|---|---|---|
  6. | `contour.html` | `/<layer>/contours/<type>.html` | `/lib/<layer>/contours.data.js` (`window.SHTUKS_LAYER.contours`) | `lab/lenses/build_contour_data.py` |
  7. | `overview.html` | `/<layer>/overview.html` | `/lib/<layer>/overview.data.js` (`window.SHTUKS_LAYER.overview`) | `lab/lenses/build_overview_data.py` |
  8. Commands for a base in `shtuks/`:
  9. ```
  10. python3 <standard-repo>/lab/lenses/build_contour_data.py --root shtuks --all --shells
  11. python3 <standard-repo>/lab/lenses/build_overview_data.py --root shtuks --all --shells
  12. node <lenses-repo>/bin/shtukbase-lenses.js build --root shtuks
  13. ```
  14. **A contour lens** is a board: the columns are the contour's states in order, the cards are the collection's records.
  15. 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.
  16. Longer than the state's `maxDays` — the card is highlighted. A cross-cutting contour (`spans`, stages with `includes`) is
  17. the same template: the columns are stages, on the card the layer's source state.
  18. **A layer overview** — records by collection, by contour — how many in each state, what is stuck,
  19. open questions and the owner's gates for the layer, a link to `ontology/graph.html` if it exists.
  20. Decisions "conditionally" (the specification does not set them):
  21. - Being stuck is computed by the lens from the current time: the data holds the moment of entering the state (`since`)
  22. and the norm; so the lens does not go stale between rebuilds.
  23. - A cross-cutting contour lives in the layer `base`: its shell is `/base/contours/<name>.html`.
  24. - In the old layout (`/contours/<layer>-<type>.md`) the shells are put in the same place as in the new one,
  25. so that lens addresses do not change after a move.
  26. - Everything auxiliary lies in one folder `lib/` in the base root: the set (`kit.js`, `kit.css`, in git),
  27. the base's data (`data.js`, `bodies.js`, not in git) and the layers' data files (`lib/<layer>/*.data.js`, in git).
  28. The shell links them by a relative path (`{{lib}}` — `../lib` for an overview, `../../lib` for a contour),
  29. so a lens opens both in Shtukbase and from disk by a double click.