Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .changeset/8801-object-kanban-allow-collapse-retired.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ near miss of the same spelling parses GREEN rather than red — this arm is not
strict, which is precisely why the tombstone rather than a deletion is what does
the refusing here.

**What replaces it: nothing you author.** Lane collapse is
`KanbanColumn.collapsed`'s — a per-lane member — not a board-level authored
toggle. On the board this arm actually renders it is the VIEWER's rather than
the author's: `KanbanImpl` collapses a swimlane when its header button is
clicked and persists that set per `swimlaneField`. The implementation that does
honour a lane's own `collapsed`, `KanbanEnhanced`, is referenced by no
registration since the `kanban-enhanced` node key retired (objectui#8257).
**What replaces it: the per-LANE member, not a board-level toggle.** Lane
collapse is `KanbanColumn.collapsed`'s — written on the lane you want collapsed,
inside `columns` — and the board this arm renders honours it (objectui#9628, in
this same release): the lane starts collapsed and the viewer can open it again.
A board-level "may lanes collapse at all" switch is what has no replacement.
SWIMLANE collapse remains the viewer's alone: `KanbanImpl` collapses a swimlane
row when its header button is clicked and persists that set per `swimlaneField`,
and no authored key reaches it.

**Migration, in this repository: no authored document changed.** Over every
tracked file, the only occurrences of the name were the two declarations retired
Expand Down
41 changes: 41 additions & 0 deletions .changeset/9628-kanban-column-collapsed-honoured.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
'@object-ui/plugin-kanban': minor
'@object-ui/types': minor
---

Honour `columns[].collapsed` on the registered kanban board (objectui#9628).

The key was declared on **both** published faces of the `object-kanban` arm — the lane
element of `ObjectKanbanSchema` (`objectql.ts` and its Zod mirror) and the runtime lane
`KanbanColumn` (`complex.ts` and its mirror) — and read by `KanbanEnhanced` alone, a
module no production source imports. An authored `{ "id": "todo", "title": "To Do",
"collapsed": true }` therefore parsed green on both faces and reached a board that did
nothing with it: `KanbanImpl`'s only collapse is the SWIMLANE row's, held in viewer
state under `objectui:kanban-collapsed:<swimlaneField>` and never keyed to a lane's
declared value. That is the ADR-0049 declared-but-unhonoured shape.

**The repair is at the reader, not at the declaration.** Retiring the key would narrow a
published accept set, and it would also strand objectui#8801's retirement tombstone,
which names `KanbanColumn.collapsed` as where lane collapse lives. Honouring it moves no
accept set in either direction: both faces already declare the member, and
`@objectstack/spec` declares the lane element as `z.unknown()`, so the protocol neither
names the key nor refuses it. Nothing that parsed before parses differently now.

**What an authored `collapsed: true` does.** The lane renders narrowed to a title spine
with its cards withheld, on **both** of the board's layouts — the flat lane and the
column cells of each swimlane row — and its heading becomes a disclosure the viewer can
open. That is the meaning `KanbanEnhanced` already gave the key, so the platform states
one behaviour for it rather than two.

The authored value is the lane's **initial** state. A viewer's own toggle wins after
that and survives the data refreshes that rebuild the lane objects: the board holds the
viewer's overrides and resolves them against the current prop, rather than copying the
authored flags into state where every refetch would re-collapse a lane the viewer had
opened. A lane whose cards could never be reached again — and whose drop target was
blind — would have been a worse board than the one that ignored the key.

**No change to a board that does not author the key.** The disclosure appears only on a
lane that declared `collapsed: true`, so an omitted key and an authored `collapsed:
false` are indistinguishable, and a board authoring neither renders the DOM it rendered
before. The published `describe` text and docblocks on both faces, the plugin README and
the plugin docs page stop pointing authors at the unregistered board.
4 changes: 2 additions & 2 deletions content/docs/plugins/plugin-kanban.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ interface KanbanLane {
cards?: KanbanCard[] // a STATIC board's lane only
limit?: number // Max cards allowed (WIP limit)
className?: string
collapsed?: boolean // honoured by the enhanced board
collapsed?: boolean // lane starts collapsed; the viewer can reopen it
}

interface KanbanCard {
Expand Down Expand Up @@ -177,7 +177,7 @@ An undeclared lane key is accepted and dropped, not refused.
| `cards` | KanbanCard[] | Cards this lane carries — **optional**, and a static board's option; an object-bound board's cards arrive from the record source |
| `limit` | number | Max cards allowed (WIP limit). Never reaches the query — the fetch window is the board's `limit` |
| `className` | string | Additional Tailwind CSS classes |
| `collapsed` | boolean | Whether the lane renders collapsed (honoured by the enhanced board) |
| `collapsed` | boolean | Whether the lane renders collapsed — narrowed to a title spine with its cards withheld, and its heading a disclosure the viewer can open. The authored value is the lane's INITIAL state: once a viewer toggles the lane, their choice holds for the session, including across data refreshes |

### Card Properties

Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-kanban/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ interface KanbanColumn {
cards: KanbanCard[];
limit?: number; // WIP limit — the count at which the lane warns
className?: string;
collapsed?: boolean; // Lane renders collapsed (read by the KanbanEnhanced
// source module, which objectui#8257 left
// with no registry key — see CHANGELOG)
collapsed?: boolean; // Lane starts collapsed — narrowed to a title
// spine, cards withheld, heading a disclosure
// the viewer can reopen (objectui#9628)
color?: never; // RETIRED — refused by name; style a lane through className
}

Expand Down
Loading
Loading