Release govoplan-dist-lists v0.1.21: unify interface contracts and documentation

This commit is contained in:
2026-09-08 01:32:32 +02:00
parent d1b2a05c91
commit c337f2f1fa
6 changed files with 59 additions and 29 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@govoplan/dist-lists-webui",
"version": "0.1.20",
"version": "0.1.21",
"private": true,
"type": "module",
"main": "src/index.ts",
@@ -14,10 +14,11 @@
"./styles/dist-lists.css": "./src/styles/dist-lists.css"
},
"scripts": {
"test:action-layout": "node scripts/test-action-layout.mjs",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"@govoplan/core-webui": "^0.1.18",
"@govoplan/core-webui": "^0.1.45",
"lucide-react": "^1.23.0",
"react": ">=19.2.7 <20",
"react-dom": ">=19.2.7 <20",
+9
View File
@@ -0,0 +1,9 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
const page = readFileSync(new URL("../src/features/distributionLists/DistributionListsPage.tsx", import.meta.url), "utf8");
assert.match(page, /id: "actions",\s*header: "Actions",\s*columnType: "actions",\s*width: 205,\s*sticky: "end"/);
assert.match(page, /id: "actions",\s*header: "Details",\s*columnType: "actions",\s*width: 90,\s*sticky: "end"/);
assert.match(page, /<TableActionGroup actions=\{\[\{\s*id: "explain"/);
assert.match(page, /<DataGridRowActions/);
console.log("Distribution List controls use the shared action-column contract.");
@@ -37,6 +37,7 @@ import { DialogSection, FormGrid, ActionToolbar,
SelectionListItemContent,
StatePanel,
StatusBadge,
TableActionGroup,
ToggleSwitch,
WorkspaceActionBar,
WorkspaceFrame,
@@ -412,6 +413,7 @@ export default function DistributionListsPage({ settings, auth }: Props) {
{
id: "actions",
header: "Actions",
columnType: "actions",
width: 205,
sticky: "end",
render: (entry, index) => (
@@ -487,15 +489,16 @@ export default function DistributionListsPage({ settings, auth }: Props) {
{
id: "actions",
header: "Details",
columnType: "actions",
width: 90,
sticky: "end",
render: (row) => (
<IconButton
label="Explain this result"
icon={<Eye size={16} />}
variant="ghost"
onClick={() => setExplanationTarget(row)}
/>
<TableActionGroup actions={[{
id: "explain",
label: "Explain this result",
icon: <Eye size={16} aria-hidden="true" />,
onClick: () => setExplanationTarget(row)
}]} />
)
}
], []);
@@ -540,6 +543,21 @@ export default function DistributionListsPage({ settings, auth }: Props) {
return (
<WorkspaceFrame as="main" height="viewport" surface="plain" className="dist-lists-page" label="Distribution lists workspace">
<WorkspaceActionBar
scope="workspace"
variant="collection"
refreshable
reloadAction={{ onReload: () => void reload(selectedId), loading: loading || busy }}
contextActions={<strong>Distribution Lists</strong>}
createAction={<IconButton
label="New distribution list"
icon={<Plus size={17} />}
variant="primary"
disabled={!canWrite}
disabledReason={!canWrite ? DIST_LISTS_I18N.writeReason : undefined}
onClick={() => requestDiscard(() => setCreateOpen(true))}
/>}
/>
<WorkspaceLayout
variant="split"
primarySize="compact"
@@ -550,21 +568,6 @@ export default function DistributionListsPage({ settings, auth }: Props) {
contentLabel="Distribution list workspace"
contentClassName="dist-lists-workspace"
primary={<>
<WorkspaceActionBar
scope="collection-pane"
variant="collection"
refreshable
reloadAction={{ onReload: () => void reload(selectedId), loading: loading || busy }}
contextActions={<strong>Distribution Lists</strong>}
createAction={<IconButton
label="New distribution list"
icon={<Plus size={17} />}
variant="primary"
disabled={!canWrite}
disabledReason={!canWrite ? DIST_LISTS_I18N.writeReason : undefined}
onClick={() => requestDiscard(() => setCreateOpen(true))}
/>}
/>
<FilterBar surface="panel">
<input
type="search"