Перейти до вмісту

Modules

A module is a register entry plus a view (spec 01). The host produces from the entry what all modules share: it loads the items a module can present (a field like a date or a position, or a class like a statement), applies search and filter, and provides detail, create and the plus button. This page is generated from the register (TOOLKIT_MODULES) and the hint table in data-interface; the intro of each module is the first paragraph of its Storybook page. Register order is tab order.

  • presents the item fields or classes the module shows; the host derives its query from them
  • loads host: the host queries by presents; module: the module queries itself (the map, by viewport)
  • suggests the item type the plus button proposes inside this module; the menu always offers all types
  • default whether a newly created space gets the module

Feed feed

The feed is the aggregating view of a space: everything that stands as a card of its own — posts, events, tasks, places — newest first, with comments and reactions on the card. It is a toolkit module and runs inside the module host (spec 01): this story contains no line of feed wiring.

presentseverything that stands as a card of its own
loadshost
suggestspost
optionssuggestType: postcreateShell: fullscreen
surfacefill: container panelFit: insetmax-w-3xl
defaultyes
links

Kanban kanban

The kanban shows the tasks of a space in columns by status and lets you drag them. It is a toolkit module and runs inside the module host (spec 01): the host loads what carries a status (presents: ["status"] — the field decides, never the type), applies search and filter, and provides detail, create ("Aufgabe" suggested) and the plus button.

presentsstatus → { hasField: [o.statusField ?? "status"] }
loadshost
suggeststask
optionssuggestType: task
surfacefill: container panelFit: insetmax-w-5xl
defaultyes
links

Kalender calendar

The calendar shows the events of a space by month, week, day or as a list. It is a toolkit module and runs inside the module host (spec 01): the host loads what carries a start (presents: ["start"] — a task with a date appears too), applies search and filter, and provides detail, create ("Termin" suggested) and the plus button.

presentsstart → { hasField: ["start"] }
loadshost
suggestsevent
optionssuggestType: event
surfacefill: container panelFit: insetmax-w-5xl
defaultyes
links

Karte map

The map shows the items of a space that have a position, clustered, with the shared search floating over it. It is a toolkit module and runs inside the module host (spec 01) — with one difference: it loads itself (loads: "module"), by viewport, so a large space never loads its whole stock. The host issues no query but still provides detail (without backdrop, panelFit: "overlay", so the map stays movable), create ("Ort" suggested) and the plus button. Picking a location for a new place happens on this map: the panel steps aside while you pick.

presentsposition → { hasField: ["position"] }
loadsmodule
suggestsplace
optionssuggestType: place
surfacefill: bleed panelFit: overlaykeepMounted
defaultyes
links

Resonanz resonance

Resonance collects statements a group positions itself on: each card carries a vote bar, and the module sorts by resonance. It is a toolkit module and runs inside the module host (spec 01): the host loads the class statement (a hint by affordance, not by field — spec 06), applies search and filter, and provides detail, create ("Aussage" suggested) and the plus button.

presentsstatement → { type: [...typesWithAffordance("votesOn", "to")] }
loadshost
suggestsstatement
optionssuggestType: statement
surfacefill: container panelFit: insetmax-w-3xl
defaultopt-in
links

Liste collection

The list shows everything in a space that stands as a card of its own, as a list or a grid; the density toggle sits in the header next to the search. It is a toolkit module and runs inside the module host (spec 01) without a line of wiring here: the host loads (no presents — the list aggregates), filters, and provides detail, create and the plus button.

presentseverything that stands as a card of its own
loadshost
suggests—
options—
surfacefill: bleed panelFit: insetmax-w-6xl
defaultopt-in
links

Graph graph

The graph shows the items of a space and their relations as a force layout: embedded relations (a task assigned to a person) and relation records (a vote on a statement) become edges; people appear as nodes only when an edge reaches them. It is a toolkit module and runs inside the module host (spec 01): the host loads everything that stands as a card, applies search and filter — here floating over the canvas (panelFit: "overlay") — and provides detail, create and the plus button.

presentseverything that stands as a card of its own
loadshost
suggests—
options—
surfacefill: bleed panelFit: overlay
defaultopt-in
links

A module of your own

Three steps, no line in the frame: a view (ModuleViewProps, it receives the items already filtered), a register entry contributed via composeModules([TOOLKIT_DEFINITION, yours]) and bound once with setModuleRegistry, and — if it presents a field or class the toolkit does not know — a row in the hint table via registerModuleHint. The network app's marketplace is the worked example: module-register.tsx.