feat: add configurable view-aware dashboards
This commit is contained in:
28
README.md
28
README.md
@@ -10,6 +10,28 @@ The module owns the `/dashboard` route when installed. Core keeps only a minimal
|
||||
fallback home for installations where this module is absent.
|
||||
|
||||
Modules contribute widgets through the `dashboard.widgets` WebUI capability.
|
||||
The first implementation stores personal widget visibility in browser storage;
|
||||
server-side layout persistence can be added later without changing the widget
|
||||
contract.
|
||||
Personal widget layouts are stored by the backend for each tenant, account, and
|
||||
active View. Configure mode supports adding, removing, ordering, sizing, and
|
||||
widget-specific settings. Existing browser-only layouts are used as a migration
|
||||
fallback until the first server save.
|
||||
|
||||
Widget providers can declare supported sizes and a small configuration schema:
|
||||
|
||||
```ts
|
||||
{
|
||||
id: "example.summary",
|
||||
surfaceId: "example.dashboard.summary",
|
||||
title: "Example summary",
|
||||
supportedSizes: ["small", "medium", "wide"],
|
||||
defaultConfiguration: { limit: 10, showDetails: true },
|
||||
configurationFields: [
|
||||
{ id: "limit", label: "Rows", kind: "number", min: 1, max: 50 },
|
||||
{ id: "showDetails", label: "Show details", kind: "boolean" }
|
||||
],
|
||||
render: ({ configuration }) => <ExampleWidget configuration={configuration} />
|
||||
}
|
||||
```
|
||||
|
||||
Every widget needs a matching View surface. The Dashboard catalogue filters
|
||||
contributions through the effective View before rendering them, while saved
|
||||
placements remain intact when a View or module temporarily hides a widget.
|
||||
|
||||
Reference in New Issue
Block a user