Files
dashgui/README.md
2026-08-08 16:58:48 +02:00

1.9 KiB

dashgui

Reusable custom GUI class components (React + MUI), shared across the dash* apps. This is the "outsourced" home for custom GUI primitives that previously lived inside dashfront/src/components.

This package is source-only: consumers import directly from src/ via the exports map, so there is no build step for the library itself.

Contents

Export Source Description
dashgui/panels src/panels/ PanelTile, PanelTileGrid, EditablePanelTile, injectMuiTheme, layout helpers
dashgui/lists src/lists/ RecordList — generic presentational data list (loading/error/empty states + table with edit/delete)
dashgui/tiles src/tiles/ Tile, TILE_SIZE, tileBaseSx
dashgui/ElevatedPill src/ElevatedPill.jsx ElevatedPill, ToggleElevatedPill, ActionElevatedPill
dashgui/SingleLineTextEdit src/SingleLineTextEdit.jsx Centralized single-line text field

Design rules

  • No app coupling. No Redux, router, notistack, storage manager, or backend error imports. Error surfaces are injected via props (e.g. EditablePanelTile's onError, RecordList's error). Data and actions are always passed in.
  • Class components for the base primitives (matches the existing codebase).
  • Only react, MUI, and MUI icons as (peer) dependencies.

Consuming from dashfront

dashfront declares "dashgui": "file:../dashgui" (npm workspace / symlink). Source imports keep changes instantly visible in the app.

Development harness

Run npm run dev to render the components on mock pages (dev/) without a backend. This is where test cases with mock pages will live.

npm install
npm run dev      # http://localhost:5199
npm run build    # bundle the dev harness (dist/)
npm run lint

Future

  • Test cases (unit + component tests) with mock pages will be added under dev/ / src/__tests__/ as they are written.