Skip to content

Commit 28a733e

Browse files
docs(ui): give the compare-widget date dimension example its synonyms (#34942)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBLW6dHPW6sSheA32XPKZzPV)_ Fixes #34874 Clause-②: no Metadata-protocol: none #34822 (merged `d576509c80`) delivered the rest of the card: both full `defineDataset` examples on the two pages, the "Give every member its vocabulary" bullet, and the `dataset-member-no-vocabulary` rule itself. This PR covers the last two examples the rule would still flag, one on each page. ## 维护者速读 - 改了什么:`dashboards.mdx`「对比组件的日期键」示例中的 `close_date` 维度,和 `analytics.mdx`「时长度量」示例中的 `avg_hours_to_resolve` 度量,都补上了 `synonyms`。 - 为什么改:两处示例都只有名称,没有 synonyms 和 description,正是 `dataset-member-no-vocabulary` 会提示的写法。作者照抄就会收到警告。 - 风险与回滚:纯文档,两个代码片段共 +9/-2 行;回滚即还原这两个文件。 - 先看:`content/docs/data-modeling/analytics.mdx` 约 :133 的时长度量片段,然后是 `content/docs/ui/dashboards.mdx` 约 :523 的 `dimensions` 片段。 - 两分钟验证:打开 analytics 页「Duration measures」小节,应见 `synonyms: ['resolution time', 'time to resolve']`,`duration` 块不变;dashboards 页「The Date Key of a Compare Widget」小节,应见 `close_date` 带 `synonyms: ['closing date', 'date closed']`。 - 需要你做的:无,席位落地。 ## What changes - `content/docs/ui/dashboards.mdx`, the snippet under "The Date Key of a Compare Widget": the `close_date` date dimension now declares `synonyms: ['closing date', 'date closed']`, in the style of the page's `salesDataset` example. Its `name` still equals the dashboard's `dateRange.field`, which is the snippet's point. - `content/docs/data-modeling/analytics.mdx`, the example under "Duration measures": the `avg_hours_to_resolve` measure now declares `synonyms: ['resolution time', 'time to resolve']`. It is split over four lines; its `duration` block, the example's point, is unchanged. ## Why Both examples declared a member with neither `synonyms` nor a `description`, exactly the shape `dataset-member-no-vocabulary` advises on (ADR-0149 D1). An author who copies either one publishes a member that a question asked in the user's own words cannot find. ## Patch round Claim amendment 6955503178 added the `analytics.mdx` duration-measure line to this claim's surface, on seat 3's ruling. Commit `434c66c932` covers it, and the closing line is now `Fixes`. ## Acceptance notes - No member declaration on either page now lacks both keys: the probe below reads every object-literal member array and standalone member fragment on both pages. - No changeset: `content/docs/**` ships in no package's `files[]`; labelled `skip-changeset`. ## Verification All readings at head `434c66c932`. <details> <summary>Rule probe over both pages (built packages/lint dist)</summary> Each object-literal `dimensions`/`measures` array and each standalone member fragment on a page was evaluated and fed to `validateDatasetMemberVocabulary`. String-array widget selections were skipped. Control leg: the same probe on the two files at base `d576509c80`. ``` head: content/docs/ui/dashboards.mdx: 5 member array(s)/fragment(s), 11 member(s), findings 0 head: content/docs/data-modeling/analytics.mdx: 3 member array(s)/fragment(s), 9 member(s), findings 0 base: dashboards.mdx findings 1 (dimension "close_date"); analytics.mdx findings 1 (measure "avg_hours_to_resolve") ``` </details> <details> <summary>Targeted gates</summary> `node scripts/pm/dispatch-gates.mjs --commands` (no paths) derived 44 commands for the 2 paths, and all 44 exit 0. ``` dispatch-gates --ran: 44 derived famil(ies) accounted for — 44 run, 0 NOT-MEASURED (a DERIVED zero — all 44 recorded an exit code and none of them is 3). overlap-check: VERDICT clean exit 0 (against origin/main 46991d0, 0 PR heads) check-governed-merges --branch: NOT governed (0 of 2 path(s) hit the register) check-nul-bytes: exit 0 ``` </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzfR33NbV51QQU6R6bm)_ <!-- signed: repo:objectstack#3 · os-support-ai · session_01WGufzfR33NbV51QQU6R6bm --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 071323e commit 28a733e

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎content/docs/data-modeling/analytics.mdx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ record (time to resolve, time to first response, cycle time) with `duration`
130130
in place of `field`:
131131

132132
```ts
133-
{ name: 'avg_hours_to_resolve', aggregate: 'avg', duration: { from: 'created_at', to: 'resolved_at', unit: 'hours' } }
133+
{
134+
name: 'avg_hours_to_resolve', aggregate: 'avg',
135+
duration: { from: 'created_at', to: 'resolved_at', unit: 'hours' },
136+
synonyms: ['resolution time', 'time to resolve'],
137+
}
134138
```
135139

136140
- `from` and `to` name two `datetime` fields of the dataset's own object, by

‎content/docs/ui/dashboards.mdx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,10 @@ declares:
523523
dimensions: [
524524
// The dashboard's dateRange filters `close_date`, so a compare widget's
525525
// window arrives as the dimension "close_date".
526-
{ name: 'close_date', label: 'Close date', field: 'close_date', type: 'date' },
526+
{
527+
name: 'close_date', label: 'Close date', field: 'close_date', type: 'date',
528+
synonyms: ['closing date', 'date closed'],
529+
},
527530
],
528531
```
529532

0 commit comments

Comments
 (0)