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
docs(spec): colorField describes a field to derive a colour FROM (#15470)
`TimelineConfigSchema`, `CalendarConfigSchema` and `GanttConfigSchema` each
declare a `colorField`, and all three `.describe()` strings said only that the
named field "determines" / "drives" the colour. That reads as "point this at a
field that holds a colour" — the case the renderers need least. The common
author intent is `colorField: 'status'`, a select field whose options already
carry the colours.
The renderers resolve it as a ladder (objectui#7243, shared as
`createFieldColorResolver` in `@object-ui/core`, present at the console pin
00d3f09c): the option colour the field declares for the record's stored value,
else the value itself when it already is a colour literal, else each renderer's
own last rung — a semantic colour token (gantt), a theme-aware palette hash
(calendar), the default marker (timeline).
The three strings now say that, each naming its own last rung.
No accept-set change: all three keys stay `z.string().optional()`, and
`check:authorable-surface` needed no regeneration. The only regenerated
follower is `content/docs/references/ui/view.mdx`.
Claude-Session: https://claude.ai/code/session_01G4138K1EG7kQ81FNba5Kp4
Co-authored-by: Claude <noreply@anthropic.com>
`colorField` now documents what it means: a field to DERIVE a colour from, not a field holding one.
6
+
7
+
`TimelineConfigSchema`, `CalendarConfigSchema` and `GanttConfigSchema` each declare a `colorField`, and all three `.describe()` strings said only that the field "determines"/"drives" the colour — `'Field to determine item color'`, `'Field whose value determines the event color'`, `'Field that drives the bar color'`. Read literally, that invites pointing the key at a field whose stored value *is* a colour, which is the one case the renderers need the least: the common author intent is `colorField: 'status'`, a select field whose options already carry the colours.
8
+
9
+
The renderers resolve it as a derivation ladder (objectui#7243, shared as `createFieldColorResolver` in `@object-ui/core`):
10
+
11
+
1. the option `color` the field declares for the record's stored value;
12
+
2. else the value itself, when it already is a colour literal (hex 3/6/8-digit, `rgb(...)`, `hsl(...)`);
13
+
3. else each renderer's own last rung — the gantt derives a semantic colour token, the calendar hashes onto its theme-aware palette, the timeline draws its default marker.
14
+
15
+
The three strings now say that, each naming its own last rung. **Nothing in the accept set moves**: all three keys stay `z.string().optional()`, and a config pointing `colorField` at a plain hex field is still exactly as valid as before — that is rung 2. This is prose on a declared key, so the only regenerated follower is `content/docs/references/ui/view.mdx`.
Copy file name to clipboardExpand all lines: content/docs/references/ui/view.mdx
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ Appearance and visualization configuration
106
106
|**startDateField**|`string`| ✅ | Field providing the event start date/time |
107
107
|**endDateField**|`string`| optional | Field providing the event end date/time (defaults to a single-day event) |
108
108
|**titleField**|`string`| optional | Field displayed as the event title. Omit to fall back to the record display name (ADR-0079 resolver chain) |
109
-
|**colorField**|`string`| optional | Field whose value determines the event color |
109
+
|**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|
|**titleField**|`string`| ✅ | Field displayed as the task title |
560
560
|**progressField**|`string`| optional | Field providing the task completion percentage |
561
561
|**dependenciesField**|`string`| optional | Field listing the task's predecessor (dependency) record ids |
562
-
|**colorField**|`string`| optional | Field that drives the bar color |
562
+
|**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|
563
563
|**parentField**|`string`| optional | Field holding the parent task id (builds the summary → step tree) |
564
564
|**typeField**|`string`| optional | Field whose value maps to task/summary/milestone |
565
565
|**baselineStartField**|`string`| optional | Baseline (planned) start field |
@@ -915,7 +915,7 @@ View filter rule
915
915
|**startDateField**|`string`| ✅ | Field providing the event start date/time |
916
916
|**endDateField**|`string`| optional | Field providing the event end date/time (defaults to a single-day event) |
917
917
|**titleField**|`string`| optional | Field displayed as the event title. Omit to fall back to the record display name (ADR-0079 resolver chain) |
918
-
|**colorField**|`string`| optional | Field whose value determines the event color |
918
+
|**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|
919
919
920
920
### Nested Shape: `ListView.gantt`
921
921
@@ -926,7 +926,7 @@ View filter rule
926
926
|**titleField**|`string`| ✅ | Field displayed as the task title |
927
927
|**progressField**|`string`| optional | Field providing the task completion percentage |
928
928
|**dependenciesField**|`string`| optional | Field listing the task's predecessor (dependency) record ids |
929
-
|**colorField**|`string`| optional | Field that drives the bar color |
929
+
|**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|
930
930
|**parentField**|`string`| optional | Field holding the parent task id (builds the summary → step tree) |
931
931
|**typeField**|`string`| optional | Field whose value maps to task/summary/milestone |
932
932
|**baselineStartField**|`string`| optional | Baseline (planned) start field |
@@ -959,7 +959,7 @@ View filter rule
959
959
|**endDateField**|`string`| optional | Field for timeline item end date |
960
960
|**titleField**|`string`| ✅ | Field to display as timeline item title |
961
961
|**groupByField**|`string`| optional | Field to group timeline rows |
962
-
|**colorField**|`string`| optional | Field to determine item color |
962
+
|**colorField**|`string`| optional | Field to derive each item 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 timeline default marker color |
|**startDateField**|`string`| ✅ | Field providing the event start date/time |
1302
1302
|**endDateField**|`string`| optional | Field providing the event end date/time (defaults to a single-day event) |
1303
1303
|**titleField**|`string`| optional | Field displayed as the event title. Omit to fall back to the record display name (ADR-0079 resolver chain) |
1304
-
|**colorField**|`string`| optional | Field whose value determines the event color |
1304
+
|**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|
1305
1305
1306
1306
### Nested Shape: `ObjectListView.gantt`
1307
1307
@@ -1312,7 +1312,7 @@ View filter rule
1312
1312
|**titleField**|`string`| ✅ | Field displayed as the task title |
1313
1313
|**progressField**|`string`| optional | Field providing the task completion percentage |
1314
1314
|**dependenciesField**|`string`| optional | Field listing the task's predecessor (dependency) record ids |
1315
-
|**colorField**|`string`| optional | Field that drives the bar color |
1315
+
|**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|
1316
1316
|**parentField**|`string`| optional | Field holding the parent task id (builds the summary → step tree) |
1317
1317
|**typeField**|`string`| optional | Field whose value maps to task/summary/milestone |
1318
1318
|**baselineStartField**|`string`| optional | Baseline (planned) start field |
@@ -1345,7 +1345,7 @@ View filter rule
1345
1345
|**endDateField**|`string`| optional | Field for timeline item end date |
1346
1346
|**titleField**|`string`| ✅ | Field to display as timeline item title |
1347
1347
|**groupByField**|`string`| optional | Field to group timeline rows |
1348
-
|**colorField**|`string`| optional | Field to determine item color |
1348
+
|**colorField**|`string`| optional | Field to derive each item 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 timeline default marker color |
|**endDateField**|`string`| optional | Field for timeline item end date |
1598
1598
|**titleField**|`string`| ✅ | Field to display as timeline item title |
1599
1599
|**groupByField**|`string`| optional | Field to group timeline rows |
1600
-
|**colorField**|`string`| optional | Field to determine item color |
1600
+
|**colorField**|`string`| optional | Field to derive each item 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 timeline default marker color |
endDateField: z.string().optional().describe('Field for timeline item end date'),
966
966
titleField: z.string().describe('Field to display as timeline item title'),
967
967
groupByField: z.string().optional().describe('Field to group timeline rows'),
968
-
colorField: z.string().optional().describe('Field to determine item color'),
968
+
colorField: z.string().optional().describe('Field to derive each item 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 timeline default marker color'),
startDateField: z.string().describe('Field providing the event start date/time'),
1301
1301
endDateField: z.string().optional().describe('Field providing the event end date/time (defaults to a single-day event)'),
1302
1302
titleField: z.string().optional().describe('Field displayed as the event title. Omit to fall back to the record display name (ADR-0079 resolver chain)'),
1303
-
colorField: z.string().optional().describe('Field whose value determines the event color'),
1303
+
colorField: z.string().optional().describe('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'),
titleField: z.string().describe('Field displayed as the task title'),
1345
1345
progressField: z.string().optional().describe('Field providing the task completion percentage'),
1346
1346
dependenciesField: z.string().optional().describe("Field listing the task's predecessor (dependency) record ids"),
1347
-
colorField: z.string().optional().describe('Field that drives the bar color'),
1347
+
colorField: z.string().optional().describe('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'),
1348
1348
// Two-level hierarchy: a parent task id (summary bar) and a row type.
1349
1349
parentField: z.string().optional().describe('Field holding the parent task id (builds the summary → step tree)'),
1350
1350
typeField: z.string().optional().describe('Field whose value maps to task/summary/milestone'),
0 commit comments