2.7 KiB
2.7 KiB
Contract: Table Management (Shared)
Scope
Defines one canonical, reusable interaction model for table-driven operator/admin screens. All patterns that expose table selection + bulk actions must inherit this contract. Visual styling is inherited from the active repository baseline (currently Vapor Soft / Vapor Night in demo/scaffold). This contract remains theme-agnostic and defines geometry/semantics only.
Canonical Regions
- Selection summary line (visible/selected counts).
- Unified table toolbar (single module container).
- Data table body.
- Pagination.
Toolbar and table must read as one continuous module:
- toolbar directly above table,
- no double borders/rounded-corner seams at the join,
- table horizontal overflow remains enabled when needed.
Toolbar Geometry
- One outer toolbar container for all groups.
- Groups are separated with vertical separators.
- Group title + icon buttons are inline and compact.
- Group order is fixed:
SelectionActionsImport/ExportTask ActionsMisc
Button Model
- Buttons are icon-first inside toolbar groups.
- Each button must expose deterministic semantics via
titleandaria-label. - Keep primary and destructive variants explicit via style tokens, not by icon ambiguity alone.
Icon Semantics (One Action = One Icon)
Do not reuse the same icon for semantically different actions in this module.
Canonical mapping:
select visible-> checked squareselect filtered-> filter + plusclear visible-> square + minusclear filtered-> filter + closeclear selection-> clear selection icon (distinct from remove/cancel/archive)run-> play/executeedit-> pencilremove-> remove/delete rowcancel-> cancel task (distinct from remove/archive)archive-> archive box/trayimport-> arrow into containerexport-> arrow out of containerexport filtered-> export + filter markerexport selected-> export + checkbox markerretry/sync-> circular refresh (two arrows along path)review-> info/review markerconfirm-> confirm/check markerinspect-> inspect/zoom marker
Table Columns
- Left
selectcolumn:- no text header label,
- minimal fixed width,
- centered checkbox control.
- Right
actionscolumn:- no text header label,
- minimal width,
- right-aligned action icons.
- Row action icons in
actionscolumn are intentionally smaller than toolbar icons.
Reuse Rule
If a pattern needs table selection + bulk actions, it must:
- Reuse this module unchanged by default.
- Document only additive overrides in the pattern-specific contract.
- Avoid redefining shared geometry/icon semantics locally.