Skip to content

Commit 106eb96

Browse files
committed
fix(spec): chart drillDown mode guidance names object-data-table, not TABLE/PIVOT/METRIC
object-metric (objectui#9002/PR objectui#10681, merged) and object-pivot (objectui#10685/PR objectui#10710, merged) both refuse drillDown.mode at their TypeScript door now. Only object-data-table still reads it. The published refusal text an author sees for drillDown.mode on a chart sent them to all three blocks, two of which now refuse the same key on arrival. Reword the guidance to name the one block that actually reads mode, and move its pin. The neighbouring `report` guidance entry is left alone — out of scope for this card. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QcAS3qiYYZNezaxZxaUdMV
1 parent d7c0241 commit 106eb96

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/lint/src/validate-react-page-props.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ describe('validateReactPageProps — <ObjectChart drillDown> (#5022)', () => {
10301030
it('rejects a key that belongs to another widget, with the reason rather than a rename', () => {
10311031
const f = validateReactPageProps(drill(`{ mode: 'record' }`));
10321032
const hit = f.find((x) => x.rule === REACT_CHART_DRILLDOWN_INVALID);
1033-
expect(hit!.message).toContain('TABLE / PIVOT / METRIC');
1033+
expect(hit!.message).toContain('object-data-table');
10341034
});
10351035

10361036
it('rejects the report near-key spelling and names the type difference', () => {

‎packages/spec/src/ui/chart.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ describe('#5022 — ChartDrillDownSchema', () => {
704704
});
705705

706706
it.each([
707-
['mode', 'TABLE / PIVOT / METRIC'],
707+
['mode', 'object-data-table'],
708708
['report', 'METRIC / PIVOT'],
709709
['view', 'read by no renderer at all'],
710710
['sort', 'read by no renderer'],

‎packages/spec/src/ui/chart.zod.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ export const ChartDrillDownSchema = lazySchema(() => strictObject(
470470
// Keys of objectui's wider renderer-side drill config. Each is real —
471471
// on another widget — so a rename suggestion would be actively wrong.
472472
mode:
473-
'`mode` (`\'filter\'` | `\'record\'`) is a TABLE / PIVOT / METRIC drill key, not a chart one: it chooses whether a click drills through an aggregate to a filtered list or straight to one record. A chart segment is always an aggregate, so a chart drill is always the filtered-list kind and there is nothing to discriminate. Delete the key.',
473+
'`mode` (`\'filter\'` | `\'record\'`) is objectui\'s `object-data-table` drill key, not a chart one: it chooses whether a click drills through an aggregate to a filtered list or straight to one record. A chart segment is always an aggregate, so a chart drill is always the filtered-list kind and there is nothing to discriminate. Delete the key.',
474474
report:
475475
'`report` (drill into an analytical report instead of the record list) is a METRIC / PIVOT widget capability in the objectui renderer; `<ObjectChart>` does not read it and renders the record list regardless. Delete the key, or drill from a metric widget instead.',
476476
view:

0 commit comments

Comments
 (0)