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
10 changes: 10 additions & 0 deletions .changeset/37941-kanban-lane-count-whole-lane.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@objectstack/spec': patch
---

docs(spec): a lookup-lane board's lane `count` is the whole lane's, not the page's

Clause-②: no
Metadata-protocol: none

The `KanbanLaneSummarySchema` doc comment and the `kanban.summary` describe said that a list view board whose lanes come from a lookup field counts the one page it was handed. Since objectstack#37327 that board reads each lane's record count from the same grouped read its `sum`, `avg`, `min` and `max` ride, so a foot `count` shows the whole lane, as the lane header does; only a source that cannot answer that read leaves the page's count, marked `+`. The text now says so, and the generated reference page follows. No schema shape changes.
6 changes: 3 additions & 3 deletions content/docs/references/ui/view.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ HTTP methods a view data source may request — the subset of `HttpMethod` witho
| **groupByField** | `string` | ✅ | Field to group columns by (usually status/select). NO leading or trailing whitespace: the board reads this name off every card verbatim, so a padded spelling collapses the whole board into one `Uncategorized` lane. |
| **lanes** | `string[]` | optional | The lanes the board draws, in this order: stored option values of the groupByField field (the option `value`, not its label). Omit to draw one lane per option in the options' own order. A record whose value is not listed is not hidden: it lands in the `Uncategorized` lane, as a record whose value matches no lane does. To keep records off the board, filter the view. List each value once. |
| **summarizeField** | `string` | optional | Field to sum at top of column (e.g. amount) |
| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `sum`, `avg`, `min` and `max` still cover every record of each lane, and its `count` counts that page. Only on a board handed its records whole, without their query, does `sum` total the records handed in and the other three show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. |
| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `count`, `sum`, `avg`, `min` and `max` still cover every record of each lane (where the source cannot answer that read, `count` counts the page, marked `+`). Only on a board handed its records whole, without their query, does `sum` total the records handed in and `avg`, `min` and `max` show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. |
| **showFieldLabels** | `boolean` | optional | Whether each card names its fields beside their values. Omit for true (names shown); false shows the values alone. |
| **hideEmptyFields** | `boolean` | optional | Whether a card leaves out a field that holds no value. Omit for true (left out); false keeps the field with an empty value. |
| **cardFooter** | `{ comments?: boolean; attachments?: boolean }` | optional | The counts each card shows at its foot, each read for the whole board over its loaded cards in grouped reads, never one per card. Omit to show none. |
Expand Down Expand Up @@ -1191,7 +1191,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma
| **groupByField** | `string` | ✅ | Field to group columns by (usually status/select). NO leading or trailing whitespace: the board reads this name off every card verbatim, so a padded spelling collapses the whole board into one `Uncategorized` lane. |
| **lanes** | `string[]` | optional | The lanes the board draws, in this order: stored option values of the groupByField field (the option `value`, not its label). Omit to draw one lane per option in the options' own order. A record whose value is not listed is not hidden: it lands in the `Uncategorized` lane, as a record whose value matches no lane does. To keep records off the board, filter the view. List each value once. |
| **summarizeField** | `string` | optional | Field to sum at top of column (e.g. amount) |
| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `sum`, `avg`, `min` and `max` still cover every record of each lane, and its `count` counts that page. Only on a board handed its records whole, without their query, does `sum` total the records handed in and the other three show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. |
| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `count`, `sum`, `avg`, `min` and `max` still cover every record of each lane (where the source cannot answer that read, `count` counts the page, marked `+`). Only on a board handed its records whole, without their query, does `sum` total the records handed in and `avg`, `min` and `max` show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. |
| **showFieldLabels** | `boolean` | optional | Whether each card names its fields beside their values. Omit for true (names shown); false shows the values alone. |
| **hideEmptyFields** | `boolean` | optional | Whether a card leaves out a field that holds no value. Omit for true (left out); false keeps the field with an empty value. |
| **cardFooter** | `{ comments?: boolean; attachments?: boolean }` | optional | The counts each card shows at its foot, each read for the whole board over its loaded cards in grouped reads, never one per card. Omit to show none. |
Expand Down Expand Up @@ -1660,7 +1660,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma
| **groupByField** | `string` | ✅ | Field to group columns by (usually status/select). NO leading or trailing whitespace: the board reads this name off every card verbatim, so a padded spelling collapses the whole board into one `Uncategorized` lane. |
| **lanes** | `string[]` | optional | The lanes the board draws, in this order: stored option values of the groupByField field (the option `value`, not its label). Omit to draw one lane per option in the options' own order. A record whose value is not listed is not hidden: it lands in the `Uncategorized` lane, as a record whose value matches no lane does. To keep records off the board, filter the view. List each value once. |
| **summarizeField** | `string` | optional | Field to sum at top of column (e.g. amount) |
| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `sum`, `avg`, `min` and `max` still cover every record of each lane, and its `count` counts that page. Only on a board handed its records whole, without their query, does `sum` total the records handed in and the other three show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. |
| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `count`, `sum`, `avg`, `min` and `max` still cover every record of each lane (where the source cannot answer that read, `count` counts the page, marked `+`). Only on a board handed its records whole, without their query, does `sum` total the records handed in and `avg`, `min` and `max` show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. |
| **showFieldLabels** | `boolean` | optional | Whether each card names its fields beside their values. Omit for true (names shown); false shows the values alone. |
| **hideEmptyFields** | `boolean` | optional | Whether a card leaves out a field that holds no value. Omit for true (left out); false keeps the field with an empty value. |
| **cardFooter** | `{ comments?: boolean; attachments?: boolean }` | optional | The counts each card shows at its foot, each read for the whole board over its loaded cards in grouped reads, never one per card. Omit to show none. |
Expand Down
14 changes: 9 additions & 5 deletions packages/spec/src/ui/view.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2389,8 +2389,11 @@ export const EmptyStateSchema = lazySchema(() => strictObject({
* objectstack#36871: the list view hands a board whose lanes it cannot know
* before the query (lanes over a lookup field) the page of records it fetched
* AND the query of that page, so that board asks the same read and its four
* aggregates cover every record of each lane too. Its `count` counts the
* page it was handed, as its lane header does. Only a board handed its cards
* aggregates cover every record of each lane too. objectstack#37327: the same
* read answers each lane's record count, so its `count` counts the whole lane,
* as its lane header does, not the page it was handed; only a read that cannot
* answer (no grouped door, a refusal, a cut answer) leaves the page's count,
* marked `+`. Only a board handed its cards
* without their query (records handed in whole) adds up a `sum` over those
* cards, and draws none of the other three.
*/
Expand Down Expand Up @@ -2518,10 +2521,11 @@ export const KanbanConfigSchema = lazySchema(() => strictObject({
+ '`{ type: \'sum\', field: \'amount\' }` totals a number field over all of the lane records, '
+ '`avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query '
+ '(a field the reader may not read shows no figure); `{ type: \'none\' }` shows nothing. '
+ 'A list view board whose lanes come from a lookup field draws one page of records: its `sum`, '
+ '`avg`, `min` and `max` still cover every record of each lane, and its `count` counts that page. '
+ 'A list view board whose lanes come from a lookup field draws one page of records: its `count`, '
+ '`sum`, `avg`, `min` and `max` still cover every record of each lane (where the source cannot answer '
+ 'that read, `count` counts the page, marked `+`). '
+ 'Only on a board handed its records whole, '
+ 'without their query, does `sum` total the records handed in and the other three show nothing. '
+ 'without their query, does `sum` total the records handed in and `avg`, `min` and `max` show nothing. '
+ 'Takes precedence over summarizeField. Omit to keep summarizeField\'s sum, or no statistic without it.',
),
/**
Expand Down
Loading