From 61186478a27d6aeee8db68b3d3ffef5357ccdb2b Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 18 Sep 2026 05:13:02 +0000 Subject: [PATCH] docs(analytics): widen the label-resolution prose to the option-bearing field, not the `select` type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both bullets named `select` as the option arm's trigger. The resolver keys on the field carrying a non-empty `options` list instead — `dimension-labels.ts` tests `Array.isArray(meta.options) && meta.options.length > 0` at all three sites and never tests `type === 'select'`. A `radio` axis therefore resolves a label while the docs said it did not. The prose now names the property the implementation names ("carries `options`") rather than growing a type enumeration. An enumeration would be wrong in both directions: `options` is an untyped optional key on the field schema, and `MULTI_OPTION_TYPES` includes the free-form `tags`, which need not declare options at all. Claude-Session: https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk Co-authored-by: Claude --- content/docs/data-modeling/analytics.mdx | 10 ++++++---- content/docs/ui/dashboards.mdx | 12 +++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/content/docs/data-modeling/analytics.mdx b/content/docs/data-modeling/analytics.mdx index 878e17cfb15..fcf19078a53 100644 --- a/content/docs/data-modeling/analytics.mdx +++ b/content/docs/data-modeling/analytics.mdx @@ -207,10 +207,12 @@ dataset-bound reports — so the numbers match everywhere. The query result is presentation-ready — authors do not format dimension or measure values by hand: -- **Dimensions** — a `select` dimension returns its option **label** (not the - stored value), a **reference** dimension (any field whose stored value is - another record's id, a `user` person axis included) returns the related - record's **display name** (not the FK id), and a `date` dimension with a +- **Dimensions** — a dimension **whose field carries `options`** returns the + option **label** (not the stored value; resolution keys on the `options` list + being there, not on the field's type, so this is not limited to `select`), a + **reference** dimension (any field whose stored value is another record's id, + a `user` person axis included) returns the related record's **display name** + (not the FK id), and a `date` dimension with a `dateGranularity` returns a human bucket label (`month` → `2026-04`, `quarter` → `2026-Q2`, `year` → `2026`). Unresolved values pass through unchanged, never blank. diff --git a/content/docs/ui/dashboards.mdx b/content/docs/ui/dashboards.mdx index 3bec1b53925..df2cd1845b1 100644 --- a/content/docs/ui/dashboards.mdx +++ b/content/docs/ui/dashboards.mdx @@ -143,11 +143,13 @@ Notes on behaviour: truncates a reproducible window instead of an arbitrary subset. - Ordering is applied to the finished grid, so a **derived measure** is a valid `sortBy` even though no single SQL statement computes it. -- A `sortBy` naming a **select** or **reference** dimension orders by the - **display label** the rows render (the option label / the related record's - name), not the stored value or foreign-key id — and the label is resolved - before `limit` applies, so a top-N by name truncates the right N. - **Reference** is the whole class of fields whose stored value is another +- A `sortBy` naming a dimension **whose field carries `options`**, or a + **reference** dimension, orders by the **display label** the rows render (the + option label / the related record's name), not the stored value or + foreign-key id — and the label is resolved before `limit` applies, so a top-N + by name truncates the right N. The option arm keys on the `options` list + being there, not on the field's type, so it is not limited to `select`; + **reference** is the whole class of fields whose stored value is another record's id, so a `user` person axis sorts by name too. Sorting by a measure (the common case) involves no label lookup and is unaffected. - A `funnel` with no declared stage order falls back to sorting by value