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/38153-ui-skill-kanban-group-field-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@objectstack/skills': patch
---

docs(skills): the objectstack-ui kanban section names the rule that judges a board's group field

Clause-②: no
Metadata-protocol: none

`skills/objectstack-ui/rules/list-views.md`: the kanban example no longer carries the comment "a select field" beside `groupByField`. The note under the example now says to group by a single-valued `select`, boolean or lookup, and names the warning a text, number or date field or a multi-valued one gets, `list-view-kanban-group-field-uncategorical`. The sentence that listed `summary`, `showFieldLabels` and `hideEmptyFields` as optional is gone: the example's comments and the `summary` note already say so. No token ceiling moves.
14 changes: 8 additions & 6 deletions skills/objectstack-ui/rules/list-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ matches when **any** of its rules does — still ANDed with the elements beside

```typescript
filter: [
{ or: [ // open, OR urgent …
{ or: [ // open, OR urgent …
{ field: 'status', operator: 'equals', value: 'open' },
{ field: 'priority', operator: 'equals', value: 'urgent' },
] },
Expand Down Expand Up @@ -264,25 +264,27 @@ const board: ListView = {
data: { provider: 'object', object: 'project_task' },
columns: ['title', 'owner_id', 'priority'],
kanban: {
groupByField: 'status', // a select field
groupByField: 'status',
lanes: ['todo', 'in_progress', 'review'],
summary: { type: 'sum', field: 'estimate_hours' }, // each lane's foot statistic
showFieldLabels: false, // optional, default true: cards name each field
hideEmptyFields: false, // optional, default true: cards drop an empty field
showFieldLabels: false, // optional, default true: cards name each field
hideEmptyFields: false, // optional, default true: cards drop an empty field
columns: ['title', 'owner_id', 'priority'], // fields shown on each card
cardFooter: { comments: true, attachments: true }, // optional foot counts
},
sort: [{ field: 'priority', order: 'desc' }],
};
```

> Group by a single-valued `select`, boolean or lookup: a text, number or date
> field or a multi-valued one warns `list-view-kanban-group-field-uncategorical`.

> `lanes` chooses the lanes and their order, not the records: a record whose
> value is unlisted lands in `Uncategorized`, so filter the view to keep records
> off the board. Omit it to draw every option in its own order; a value that is
> not one of the field's inline options, or listed twice, fails `os validate`.

> `summary`, `showFieldLabels` and `hideEmptyFields` are optional. `summary.type`:
> `none`, `count`, or `sum` / `avg` / `min` / `max` of a `field`, computed by the
> `summary.type`: `none`, `count`, or `sum` / `avg` / `min` / `max` of a `field`, computed by the
> query over every record of the lane, lanes over a lookup field included. Omit
> `summary` to keep the older `summarizeField`'s sum, or no statistic without it.
> `cardFooter` takes those two members only: `comments` counts the record's open
Expand Down
Loading