docs(dashboards): document the user-attribute default on the time granularity switcher - #11718
Conversation
…nularity switcher The controls page documents this setting for filters, parent controls and field switchers; the Time granularity switcher section stopped at the static default, which is now only half the story. Covers what the attribute is matched against (the granularity NAMES, not the localized labels the control renders), what an unusable value does, and where the attribute sits in the precedence order against a URL parameter, a viewer's own pick and a parent control's mapping.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Claude finished @mngr's task in 1m 58s —— View job Docs-only change, well-integrated — 0 high, 1 medium, 2 low, all posted inlineFull review
ScopeOne file, What's right
Findings
Not applicableNo code, tests, queries, or auth logic in this diff — the security, performance and test-coverage passes have nothing to bite on. The behavioral claims (case-insensitive matching, array-first-match, out-of-range values ignored rather than forced) originate in VerificationNo prior review threads on this PR, so nothing to resolve or deduplicate against. Prose-only change — no build or lint run; |
…hat the control actually does
Review round, all three fair:
- The parent-control clause read unconditionally, but an option can leave a
child empty — `resolveParentApplications` returns no application for it, so
the attribute still seeds the switcher. Scoped, with the third state
("Reset to default", which goes to the SAVED default rather than the
viewer's attribute) named as well.
- The match target is the switcher's ALLOWED granularities, not the full
built-in set; naming that here saves a round trip to the paragraph below.
- Nested under "Default granularity" as `####`, so the section's opening
"the default above" points at its enclosing heading — the shape the filter's
and parent's versions already have.
|
Claude finished @mngr's task in 1m 3s —— View job All 3 prior findings addressed — 0 high, 0 medium, 1 low (new
|
| Prior finding | Resolution |
|---|---|
| Medium — unconditional parent-control clause | Scoped to options that map a granularity, plus an explicit clause for Left empty (attribute still seeds) and for Reset to default |
| Low — enumeration implied the full built-in set | Now "the granularity names the switcher allows" |
Low — ### sibling made "the default above" point at a peer |
Now #### User attribute default nested under ### Default granularity, matching the filter's and parent's shape |
All three threads were mine, outdated, and genuinely addressed — resolved them. No human reviewer threads exist on this PR, so nothing was touched there.
Two things also improved unprompted: the <Steps> now carry title attributes (the sibling sections' steps do too), and the field-switcher/sharing cross-references were kept in sync with the new anchor.
Anchors re-verified
Every target in the new section resolves against the current file: #allowed-granularities (L87), #default-granularity (L95, no collision with ### Default granularity per option at L160), #visibility (L318), #parent (L196), #children (L216), #sharing-the-current-selection (L293), and the three explicit {#…-user-attribute-default} ids. [ref-user-attributes] is still defined. The heading-level change didn't break anything because the anchor is explicit.
Remaining finding
| # | Severity | Location | Issue |
|---|---|---|---|
| 1 | Low | L132 | The new Reset to default clause asserts the switcher goes to the static default granularity rather than re-resolving the attribute. The Children table says only "cleared back to its own default", which doesn't disambiguate the two readings for a viewer who has an attribute. Posted inline — worth a check against the enterprise PR, or dropping the clause. |
Not applicable
Docs-only, prose-only. No code, tests, queries, or auth logic — the security, performance and test-coverage passes have nothing to bite on. The behavioral claims (case-insensitive matching, array-first-match, out-of-range values ignored, the "Below Visibility" placement) originate in cubedevinc/cubejs-enterprise#14627 and can't be verified from this repo; they read as internally consistent. Correct site per CLAUDE.md — the legacy /docs tree is untouched, and no docs.json change is needed since this extends an existing page.
No build or lint run; yarn dev in docs-mintlify is the check if you want to eyeball the rendered <Steps> and tables.
…ute-seeded switcher Verified against the implementation rather than asserted: `resolveParentApplications` resolves a TIME_GRAIN reset to the child's saved `defaultGrain` and never consults `userAttributeName`, and skips the child entirely when no default is saved — so the attribute value survives that case. Both branches are now pinned by tests in `parent-widget.spec.ts` (cubedevinc/cubejs-enterprise#14627).
|
Claude finished @mngr's task in 54s —— View job Clean — all four prior findings resolved, no new issues (0 high, 0 medium, 0 low)Full review
What changed since the last round
-one set to **Reset to default** sends the switcher to the [default granularity](#default-granularity) saved on it, not to the viewer's attribute.
+one set to **Reset to default** sends the switcher to the [default granularity](#default-granularity) saved on it rather than re-resolving the attribute, and leaves the switcher untouched when no default granularity was saved.Two things make this the right resolution rather than a reword:
Cumulative state of the four findings
All four threads were mine and are already resolved and outdated — nothing left to resolve, and no human reviewer threads exist on this PR. Anchors re-verified against the current file
Not applicableDocs-only, prose-only, single file, correct site per No build or lint run here; |
What
The Controls page documents the User attribute default setting for filters, field switchers and parent controls. The Time granularity switcher section stopped at the static default — the switcher now takes a per-viewer default too (cubedevinc/cubejs-enterprise#14627), so one dashboard can open daily for the operations team and monthly for the executives reading the same charts.
What's added
A
User attribute defaultsection under Time granularity switcher, matching the shape of the three that already exist, and covering the parts that differ:week,Month), not the localized labels the control renders — so one tenant-wide attribute resolves the same for viewers in every language;Plus the three cross-references that list which controls support the setting, and the "never a personalized default" bullet under Sharing the current selection — an attribute-resolved granularity stays out of the shared link, exactly as an attribute-resolved filter value does.
🤖 Generated with Claude Code