You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 66452df
Browse filesBrowse the repository at this point in the historyBrowse files
feat(fields,plugins,platform-objects): a select option is coloured only when its author declared a colour (#37427)
Fixes#36882Fixes#37385
Clause-②: no
Metadata-protocol: semantic
Skills-docs: follow-up #37406
## 维护者速读
-
所有应用的下拉选项:没登记颜色的标签(列表、分组行、看板、筛选面板、甘特图、日历)从按值自动上色变成中性灰;登记了颜色的照旧。平台自带对象(通知严重程度、审批状态、任务状态等)已在定义里登记了原来的颜色,看起来不变。
- 为什么做:HotCRM
维护者要求去掉系统默认配色,维护者裁定全部去掉、没配就灰,让标签颜色只表达作者登记的含义;服务端那半(平台自带对象自己登记颜色)在同一个 PR
里一起落地。
- 出错会怎样:最坏是某个本该有颜色的标签变灰,或甘特条变成默认蓝,数据不受影响;回退这个 PR 即可完全恢复原样。
- 要你做的:无。
## What changes
Ruling 7178358629 on #36882 (option A, the maintainer verbatim 「A
全部去掉,没配就灰」): a select option is coloured if and only if its author
declared a colour.
- **`@object-ui/fields`** (term 1): `SEMANTIC_COLOR_MAP`,
`BADGE_FALLBACK_PALETTE` and `hashToColor` are deleted.
`getBadgeColorClasses(color)` answers the declared family or the neutral
badge (`bg-muted text-muted-foreground border-border`);
`getSemanticColorName(color)` answers the declared family or
`undefined`; the `appearance: 'dot'` branch answers the declared colour
or `DOT_COLOR_MAP.gray`. Both helpers keep their second parameter (now
`_value`, unread) so every caller compiles unchanged. Hex declarations
(objectui#5141) are untouched.
- **Callers in the card's blast table** (grid cells and group rows,
kanban, filter value panel) needed no code change: they all route
through the two helpers. Docblocks that described the fallback are
corrected (`ui/packages/types` `complex.ts`, `GroupRow.tsx`,
`ObjectGrid.tsx`, and the shared `colorField` resolver
`ui/packages/core/src/utils/record-color.ts`).
- **Gantt `colorField`** (term 2): rungs 1-2 stay (declared option
colour, colour literal); rung 3 and the status / state / priority /
severity fallback are gone, so an undeclared value leaves `color`
undefined and `GanttView` paints its default bar colour. A palette
family declared on an option (`color: 'blue'`) paints that family's
palette hex through `getSemanticHex` (#3b82f6, the badge's blue), not
the CSS named colour (#0000ff); only rung 1 can yield a family name, so
no stored value is ever mapped.
- **Calendar** (term 1): the calendar's own 8-stop hash is deleted.
`ObjectCalendar` hands `CalendarView` the declared option colour or a
colour literal (the shared ladder), else only a value that already is a
Tailwind colour utility (`isTailwindColorToken`); a category label or a
palette family name stored as data hands on nothing. `resolveEventColor`
keeps hex and Tailwind-utility pass-through, paints a palette family
(which now only arrives as a declaration) with that family's tint, and
paints `DEFAULT_EVENT_COLOR` for anything else.
- **No opt-in switch** (term 3).
- **Platform objects declare their colours** (term 6, #37385): every
platform-shipped select option whose value hit the deleted table with no
`color` of its own now declares the colour it rendered with (same
family): 50 options on 27 fields. Enumerated at runtime: every object
definition under `packages/**` (spec, cli, qa, lint, verify, tests and
fixtures excluded; 176 files, 145 objects, 109 option-bearing fields)
was imported and each option's value looked up in the table as it stood
at the base commit; at this head the walk reports 0 table hits without a
declared colour and every declared colour equal to the table's.
`sys_notification.severity` and `inbox_message.severity` (info blue,
warning yellow, critical red); `sys_approval_request.status` (pending
yellow, approved green, rejected and cancelled red); and the status /
state options of `sys_email`, `sys_identity_email`, `sys_import_job`,
`sys_job_queue`, `sys_job_run`, `sys_job`, `sys_trusted_key`,
`sys_task`, `sys_invitation`, `sys_audit_signing_key`,
`sys_audience_binding_suggestion`, `sys_automation_run`,
`sys_connector_credential`, `sys_flow_credential`, `sys_flow_dispatch`,
`sys_sync_run`, `sys_channel_account`, `sys_notification_delivery`,
`sys_notification_preference.digest`, `sys_notification_receipt`,
`sys_file`, `sys_upload_session`, `sys_metadata.state`, and
`sys_activity.type` `completed`. Array-shorthand entries became `{
label, value, color }` with the label the shorthand produces (`label` =
the string, `value` = its snake case), so stored values and labels are
unchanged (`check:i18n` in sync). `examples/**` are not declared: their
undeclared options turning neutral is the ruled reach.
- **`@objectstack/spec`**: the calendar and gantt `colorField`
descriptions named the retired derivation ("hashed from the value", "a
semantic color token derived from the value"); they now name the default
colour. Describe text only, restating ruling terms 1-2, no schema change
(`check:authorable-surface` and `check:api-surface` unchanged); the
references pages are regenerated.
- **Changesets**: two, one per card, both declaring `Clause-②: no` and
`Metadata-protocol: semantic` (an omitted option colour now means
neutral: a changed default). `@object-ui/fields`,
`@object-ui/plugin-calendar`, `@object-ui/plugin-gantt` and
`@objectstack/spec` are `minor`; the eight server packages `patch`. Spec
is `minor` because Check Changeset judges the level only on the packages
whose published source it counts as moved (spec and the server packages;
the `@object-ui` packages are not among them), and the changed meaning
of `colorField` is published from spec. The first names the reach, and
that a declared colour outside the nine families renders neutral
(#37435).
Read first, by risk:
1. `ui/packages/fields/src/index.tsx`: `getBadgeColorClasses`,
`getSemanticColorName`, the dot branch of `SelectCellRenderer`.
2. `ui/packages/plugin-gantt/src/ObjectGantt.tsx`: the bar colour block
(`resolveColorFieldValue` is now the whole ladder).
3. `ui/packages/plugin-calendar/src/CalendarView.tsx`:
`resolveEventColor` and `FAMILY_EVENT_COLORS`.
Two-minute verification: `pnpm --dir ui exec vitest run
packages/fields/src/__tests__/badge-severity-27521.test.ts`. Expect 4
passed: declared info / warning / critical are blue / yellow / red, and
undeclared ones carry no palette family in light or dark.
## Tests
- **Rewritten to the declared path** (term 4):
`badge-severity-27521.test.ts` (declared severity colours; undeclared
neutral with no family class light or `dark:`; a control that the family
pattern does match a declared family), and the no-colour cases of
`badge-hex-fidelity-5141.test.tsx` (each now asserts the undeclared
value neutral beside the same value with a declared family).
- **New pins, one per surface, neutral beside declared**: dot
(`badge-hex-fidelity-5141.test.tsx`), grid group pill and desktop cell
(`plugin-grid` `badgeHexCrossSurface.test.tsx`), kanban card
(`plugin-kanban` `badgeHexCrossSurface.test.tsx`), filter value chips
(`listConditions.test.tsx`), gantt ladder
(`ObjectGantt.harness.test.tsx`: no rung 3, no status fallback, a
declared family paints its palette hex), calendar
(`CalendarView.test.tsx`;
`ObjectCalendar.colorFieldLadder-7243.test.tsx`: an undeclared value
equal to a family name hands on nothing, a family declared on the option
reaches the event, a Tailwind utility still passes). Light and dark: the
neutral classes are theme tokens with no `dark:` variant, and every
neutral pin asserts no palette-family utility, light or `dark:`.
- **Server half**: `sys-notification-display-labels.test.ts` asserts the
declared severity colours; `approval-status-vocabulary.test.ts` asserts
the declared approval status colours (and none on `recalled` /
`returned`).
## Acceptance notes
- **Term 5, arm B.** The ruling's `minor` with `Metadata-protocol: none`
cannot both pass the changeset gates; seat verdict 7182932149 (contract
record 7182916794, M2) rules arm B, `Metadata-protocol: semantic` with
fields, calendar and gantt at `minor`, and the zone amended both claim
lines (7182960096).
- **Spec describe text** (`packages/spec/src/ui/view.zod.ts`, outside
the claim's file surface): prose only, the docs consequence of ruling
term 2; no schema, export or authorable-key change.
- **Enumeration correction**: an earlier literal scan of
`Field.select(...)` calls missed `sys_approval_request.status`, whose
options are mapped from the contract's status list; the runtime walk
above found it and it is declared in its own commit.
- **Gantt, a palette name stored as the value** (`accent: 'red'`): rung
3 used to map it to the palette hex; with rung 3 retired as ruled it now
leaves the default bar. Hex, `rgb()` and `hsl()` values still pass
through as rung 2.
- **Calendar, a family name**: declared on an option (`color: 'green'`)
it paints that family's tint; stored as a record value with no option
colour it paints the default event colour, as the gantt does.
- **Gantt, a declared family name**: paints the palette hex; before this
PR it painted the palette hex through rung 3 as well, so a platform or
app declaration of `blue` / `green` looks as it did.
- **A declared colour outside the nine families and not a hex**
(`amber`, `teal`): the badge maps never knew these, so they used to
reach the hash; they now render neutral, said in the changeset; the
warning is carded as #37435. No platform or example option declares one;
the kanban fixture that declared `amber` now declares `green`.
- **Values the hash alone coloured** (e.g. `recalled`, `returned`,
`in_flight`, `timeout`) render neutral on platform objects too: term 6
covers the table, not the hash.
- Out of the ruling's scope and untouched: chart series colours
(`buildOptionColorMap`), app-tile and presence avatar hashes, the
gallery cover seed.
## Verification
Readings for heads `dc20242087` and the spec-level commit above it
(objectstack, this branch, with `origin/main` 5d21d43 merged). CI
check-runs are cited in the report comment on #36882.
<details><summary>Rework round 1 (seat verdict 7182932149): what changed
and its readings</summary>
- M2: both changesets declare `Metadata-protocol: semantic`; fields,
plugin-calendar and plugin-gantt at `minor`. With spec left at `patch`,
Check Changeset went red on head dc20242 ("none of them is graded
`minor` or above"; reproduced locally with the PR event, exit 1), so
spec is `minor` too: `check-changeset-no-major --base origin/main
--event` exit 0 (LEVEL AXIS passes).
- S1, gantt: a declared family paints its palette hex. New pin in
`ObjectGantt.harness.test.tsx` (`blue` to #3b82f6, `green` to #22c55e).
Ablation G (mapping removed): 1 failed, restored, blob equals HEAD.
- S2, calendar: an undeclared value equal to a family name hands on
nothing. New pins in `ObjectCalendar.colorFieldLadder-7243.test.tsx`.
Ablation H (raw value handed on again): 2 failed, restored, blob equals
HEAD.
- The Tailwind-token check sits in its own module
(`eventColorToken.ts`): 19 calendar tests mock `./CalendarView`, and a
helper exported from it reached `ObjectCalendar` as undefined under
those mocks (27 failed in the first run, 0 after the move).
- S3: changeset line naming out-of-family colours rendering neutral, and
#37435.
</details>
<details><summary>Tests after the main merge (all exit 0)</summary>
- UI: plugin-calendar and fields together 397 files / 5550 tests passed;
plugin-gantt 97 / 810. kanban, list and grid were not re-run locally (no
change on either side since round 0, where they passed 88 / 582, 187 /
2071, 314 / 2792); Test UI covers them.
- UI type-check, `turbo run type-check` over fields, plugin-calendar,
plugin-gantt, plugin-grid, plugin-kanban, plugin-list, core, types: 66
of 66 tasks, all eight type-check tasks cache misses.
- Server, packages the merge also touched: platform-objects 127 / 2176,
plugin-security 290 / 7312 (including
`insert-check-post-image.test.ts`); typecheck exit 0 for both. The other
six server packages changed on neither side since round 0.
- Round-0 ablations A to F (badge, dot, calendar default, gantt rung 3,
approval and notification colours) stand: those lines did not change.
</details>
<details><summary>Gates</summary>
- `dispatch-gates --commands` derives 125 families for this diff, the
same list as round 0; all were run on this round's heads with exit codes
recorded. Three first refused as PREREQUISITE NOT MET in the fresh
worktree (`check:skill-examples`, `check:dual-build-cjs-loads`,
`check:i18n`) and passed after a full packages build; the ui `scripts/`
suite passed 172 files / 5130 tests; `check:type-check-debt` OK.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Utp6Ca6EBDpTBZk8v46Jjv)_
<!-- signed: repo:objectstack#5 · os-bill ·
session_01Utp6Ca6EBDpTBZk8v46Jjv -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
feat(fields,plugins): a select option is coloured only when its author declared a colour
9
+
10
+
Clause-②: no
11
+
Metadata-protocol: semantic
12
+
13
+
**Reach: every app's select options that declare no `color` now render neutral.** Until now an option with no declared colour was still drawn in colour: the renderer looked its value up in a built-in table of English and Chinese words (`won` green, `open` blue, `已联系` blue, ...), and when that missed it hashed the value onto an eight-colour palette. The colour looked meaningful and was not, and could say the opposite of the value. Now a colour on a badge means exactly one thing: the author declared it.
14
+
15
+
-**Badges, dots and chips** (grid cells and group rows, kanban cards, the filter value panel): an option with no declared `color` renders the neutral badge (`bg-muted text-muted-foreground border-border`, theme-aware in light and dark) or the gray dot. Declared colours, family names and hex, render exactly as before.
16
+
-**`getBadgeColorClasses(color)`** answers the declared family or the neutral badge; **`getSemanticColorName(color)`** answers the declared family or `undefined`. Both keep their second parameter so existing callers compile, and neither reads it.
17
+
-**Gantt `colorField`**: the bar takes the field's declared option colour (a declared palette family such as `blue` paints that family's palette hex, the colour its badge shows), else the value when it already is a colour literal (hex, `rgb()`, `hsl()`), else the default bar colour. The alert stroke (`borderColorField`) maps a declared palette family to the same palette hex as the bar. No colour is derived from the value any more (a palette name such as `red` stored as the value included), and the record's `status` / `state` / `priority` / `severity` no longer colours a bar.
18
+
-**Calendar**: an event takes its declared colour (a palette family declared on the option now paints that family's tint), a hex or a Tailwind utility as before, and now an `rgb()` / `hsl()` value too, painted as a hex is; any other value, a palette family name stored as a record value included, paints the default event colour instead of a hashed one.
19
+
-**`@objectstack/spec`**: the `colorField` descriptions of the calendar and gantt configs say so; the calendar's also names the Tailwind-utility rung.
20
+
-**A declared colour outside the nine palette families and not a hex** (for example `teal` or `amber`) is accepted by the schema but renders neutral, as no declaration: before, the value hash coloured it. Declare one of `gray`, `red`, `orange`, `yellow`, `green`, `blue`, `indigo`, `purple`, `pink` or a hex instead; a warning for these spellings is tracked in #37435.
21
+
22
+
**To keep a colour, declare it on the option**: `{ label: 'Won', value: 'won', color: 'green' }`. There is no switch that brings automatic colouring back. The platform's own objects declare the colours they rendered with (`sys_notification.severity` and the rest), so their badges do not change.
feat(platform-objects,services,plugins): platform select options declare the colours they render with
13
+
14
+
Clause-②: no
15
+
Metadata-protocol: semantic
16
+
17
+
The renderer now colours a select option only when its author declared a colour. Every platform-shipped option that took its colour from the renderer's value table now declares that colour itself, in the same palette family, so no platform badge turns neutral: `sys_notification.severity` and `inbox_message.severity` (info blue, warning yellow, critical red), and the status and state options of jobs, imports, emails, flow and sync runs, credentials, deliveries, receipts, uploads, files, invitations, signing and trusted keys, tasks, approval requests, metadata rows and audience-binding suggestions, and the `completed` activity type. Stored values and labels are unchanged.
Copy file name to clipboardExpand all lines: content/docs/references/ui/component.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -502,7 +502,7 @@ const result = ActionButtonPropsSchema.parse(data);
502
502
|**startDateField**|`string`| ✅ | Field providing the event start date/time |
503
503
|**endDateField**|`string`| optional | Field providing the event end date/time (defaults to a single-day event) |
504
504
|**titleField**|`string`| optional | Field displayed as the event title. Omit to fall back to the record display name (ADR-0079 resolver chain) |
505
-
|**colorField**|`string`| optional | Field to derive each event color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else the calendar theme-aware palette color hashed from the value|
505
+
|**colorField**|`string`| optional | Field to derive each event color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()) or a Tailwind color utility class (bg-…, text-…), else the default event color: a value that is no color is never turned into one|
506
506
|**allDayField**|`string`| optional | Field carrying the all-day flag for each event (names a boolean field, not a value): a record whose flag is true is drawn as an all-day band rather than at a clock time, and one whose flag is absent or false is not all-day. Omit to leave the renderer inference in place — an event with no end date draws as all-day |
507
507
|**initialDate**|`string`| optional | Where the calendar opens: the month, week or day the active view mode shows that holds this date; omit it to open on today. A record anchor: `first_record` opens on the earliest start date (the startDateField value) among the records the view's filter selects, `next_record` on the earliest on or after the viewer's today (a `date` start field compares as a calendar day), and either opens on today when no record qualifies. Or a wrapped date-macro token, resolved each time the calendar opens: `{today}`, `{next_month_start}`, `{current_quarter_start}`, `{3_months_from_now}` (the full vocabulary is `DATE_MACRO_TOKENS` and the parameterised `DATE_MACRO_PARAM_RE` grammar in `@objectstack/spec/data`); a fixed calendar date is not accepted, because it goes stale as time passes. |
508
508
@@ -765,7 +765,7 @@ Sort field and direction pair
765
765
|**titleField**|`string`| ✅ | Field displayed as the task title |
766
766
|**progressField**|`string`| optional | Field providing the task completion percentage |
767
767
|**dependenciesField**|`string`| optional | Field listing the task's predecessor (dependency) record ids |
768
-
|**colorField**|`string`| optional | Field to derive each bar color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else a semantic color token derived from the value|
768
+
|**colorField**|`string`| optional | Field to derive each bar color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else the default bar color: a value that is no color is never turned into one|
769
769
|**parentField**|`string`| optional | Field holding the parent task id (builds the summary → step tree) |
770
770
|**typeField**|`string`| optional | Field whose value maps to task/summary/milestone |
771
771
|**baselineStartField**|`string`| optional | Baseline (planned) start field |
Copy file name to clipboardExpand all lines: content/docs/references/ui/view.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ Appearance and visualization configuration
107
107
|**startDateField**|`string`| ✅ | Field providing the event start date/time |
108
108
|**endDateField**|`string`| optional | Field providing the event end date/time (defaults to a single-day event) |
109
109
|**titleField**|`string`| optional | Field displayed as the event title. Omit to fall back to the record display name (ADR-0079 resolver chain) |
110
-
|**colorField**|`string`| optional | Field to derive each event color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else the calendar theme-aware palette color hashed from the value|
110
+
|**colorField**|`string`| optional | Field to derive each event color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()) or a Tailwind color utility class (bg-…, text-…), else the default event color: a value that is no color is never turned into one|
111
111
|**allDayField**|`string`| optional | Field carrying the all-day flag for each event (names a boolean field, not a value): a record whose flag is true is drawn as an all-day band rather than at a clock time, and one whose flag is absent or false is not all-day. Omit to leave the renderer inference in place — an event with no end date draws as all-day |
112
112
|**initialDate**|`string`| optional | Where the calendar opens: the month, week or day the active view mode shows that holds this date; omit it to open on today. A record anchor: `first_record` opens on the earliest start date (the startDateField value) among the records the view's filter selects, `next_record` on the earliest on or after the viewer's today (a `date` start field compares as a calendar day), and either opens on today when no record qualifies. Or a wrapped date-macro token, resolved each time the calendar opens: `{today}`, `{next_month_start}`, `{current_quarter_start}`, `{3_months_from_now}` (the full vocabulary is `DATE_MACRO_TOKENS` and the parameterised `DATE_MACRO_PARAM_RE` grammar in `@objectstack/spec/data`); a fixed calendar date is not accepted, because it goes stale as time passes. |
|**titleField**|`string`| ✅ | Field displayed as the task title |
549
549
|**progressField**|`string`| optional | Field providing the task completion percentage |
550
550
|**dependenciesField**|`string`| optional | Field listing the task's predecessor (dependency) record ids |
551
-
|**colorField**|`string`| optional | Field to derive each bar color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else a semantic color token derived from the value|
551
+
|**colorField**|`string`| optional | Field to derive each bar color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else the default bar color: a value that is no color is never turned into one|
552
552
|**parentField**|`string`| optional | Field holding the parent task id (builds the summary → step tree) |
553
553
|**typeField**|`string`| optional | Field whose value maps to task/summary/milestone |
554
554
|**baselineStartField**|`string`| optional | Baseline (planned) start field |
@@ -1056,7 +1056,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma
1056
1056
|**startDateField**|`string`| ✅ | Field providing the event start date/time |
1057
1057
|**endDateField**|`string`| optional | Field providing the event end date/time (defaults to a single-day event) |
1058
1058
|**titleField**|`string`| optional | Field displayed as the event title. Omit to fall back to the record display name (ADR-0079 resolver chain) |
1059
-
|**colorField**|`string`| optional | Field to derive each event color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else the calendar theme-aware palette color hashed from the value|
1059
+
|**colorField**|`string`| optional | Field to derive each event color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()) or a Tailwind color utility class (bg-…, text-…), else the default event color: a value that is no color is never turned into one|
1060
1060
|**allDayField**|`string`| optional | Field carrying the all-day flag for each event (names a boolean field, not a value): a record whose flag is true is drawn as an all-day band rather than at a clock time, and one whose flag is absent or false is not all-day. Omit to leave the renderer inference in place — an event with no end date draws as all-day |
1061
1061
|**initialDate**|`string`| optional | Where the calendar opens: the month, week or day the active view mode shows that holds this date; omit it to open on today. A record anchor: `first_record` opens on the earliest start date (the startDateField value) among the records the view's filter selects, `next_record` on the earliest on or after the viewer's today (a `date` start field compares as a calendar day), and either opens on today when no record qualifies. Or a wrapped date-macro token, resolved each time the calendar opens: `{today}`, `{next_month_start}`, `{current_quarter_start}`, `{3_months_from_now}` (the full vocabulary is `DATE_MACRO_TOKENS` and the parameterised `DATE_MACRO_PARAM_RE` grammar in `@objectstack/spec/data`); a fixed calendar date is not accepted, because it goes stale as time passes. |
1062
1062
@@ -1069,7 +1069,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma
1069
1069
|**titleField**|`string`| ✅ | Field displayed as the task title |
1070
1070
|**progressField**|`string`| optional | Field providing the task completion percentage |
1071
1071
|**dependenciesField**|`string`| optional | Field listing the task's predecessor (dependency) record ids |
1072
-
|**colorField**|`string`| optional | Field to derive each bar color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else a semantic color token derived from the value|
1072
+
|**colorField**|`string`| optional | Field to derive each bar color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else the default bar color: a value that is no color is never turned into one|
1073
1073
|**parentField**|`string`| optional | Field holding the parent task id (builds the summary → step tree) |
1074
1074
|**typeField**|`string`| optional | Field whose value maps to task/summary/milestone |
1075
1075
|**baselineStartField**|`string`| optional | Baseline (planned) start field |
@@ -1524,7 +1524,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma
1524
1524
|**startDateField**|`string`| ✅ | Field providing the event start date/time |
1525
1525
|**endDateField**|`string`| optional | Field providing the event end date/time (defaults to a single-day event) |
1526
1526
|**titleField**|`string`| optional | Field displayed as the event title. Omit to fall back to the record display name (ADR-0079 resolver chain) |
1527
-
|**colorField**|`string`| optional | Field to derive each event color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else the calendar theme-aware palette color hashed from the value|
1527
+
|**colorField**|`string`| optional | Field to derive each event color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()) or a Tailwind color utility class (bg-…, text-…), else the default event color: a value that is no color is never turned into one|
1528
1528
|**allDayField**|`string`| optional | Field carrying the all-day flag for each event (names a boolean field, not a value): a record whose flag is true is drawn as an all-day band rather than at a clock time, and one whose flag is absent or false is not all-day. Omit to leave the renderer inference in place — an event with no end date draws as all-day |
1529
1529
|**initialDate**|`string`| optional | Where the calendar opens: the month, week or day the active view mode shows that holds this date; omit it to open on today. A record anchor: `first_record` opens on the earliest start date (the startDateField value) among the records the view's filter selects, `next_record` on the earliest on or after the viewer's today (a `date` start field compares as a calendar day), and either opens on today when no record qualifies. Or a wrapped date-macro token, resolved each time the calendar opens: `{today}`, `{next_month_start}`, `{current_quarter_start}`, `{3_months_from_now}` (the full vocabulary is `DATE_MACRO_TOKENS` and the parameterised `DATE_MACRO_PARAM_RE` grammar in `@objectstack/spec/data`); a fixed calendar date is not accepted, because it goes stale as time passes. |
1530
1530
@@ -1537,7 +1537,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma
1537
1537
|**titleField**|`string`| ✅ | Field displayed as the task title |
1538
1538
|**progressField**|`string`| optional | Field providing the task completion percentage |
1539
1539
|**dependenciesField**|`string`| optional | Field listing the task's predecessor (dependency) record ids |
1540
-
|**colorField**|`string`| optional | Field to derive each bar color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else a semantic color token derived from the value|
1540
+
|**colorField**|`string`| optional | Field to derive each bar color from (it names a field, not a color): the option color declared on that field for the record value, else the value itself when it already is a color literal (hex, rgb() or hsl()), else the default bar color: a value that is no color is never turned into one|
1541
1541
|**parentField**|`string`| optional | Field holding the parent task id (builds the summary → step tree) |
1542
1542
|**typeField**|`string`| optional | Field whose value maps to task/summary/milestone |
1543
1543
|**baselineStartField**|`string`| optional | Baseline (planned) start field |
0 commit comments