[pull] master from cube-js:master - #703
Merged
Merged
Conversation
* docs(dashboards): document the Field switcher control
Adds the fourth dashboard control type to the Controls page: what it does,
how it differs from a filter (which narrows rows) and a time granularity
switcher (which rebuckets them), and how to configure Field Type, the
replaced member, and the alternatives viewers may switch to.
Covers the settings that are not self-evident from the UI:
- the default option, and what happens when the member serving as it is
removed from the alternatives;
- per-option default granularity for time dimensions, why it exists, and how
a viewer's own granularity pick outranks it while an untouched granularity
control does not;
- the user attribute default, and why a value outside the alternatives is
ignored rather than forced;
- that the swap keeps the replaced member's output name, so column
formatting, sorting, pivots and conditional formatting survive a switch;
- what the "could not be applied" notice means β the switch is applied only
if both the SQL and the query description take it β and how that differs
from a chart the control simply doesn't scope, which shows no notice.
States the two current limitations plainly rather than leaving them to be
discovered: a field switcher cannot be a parent control's child, and a
viewer's choice is not carried in the shared URL, so a recipient opens on the
control's own default. Both are noted as limitations, not design.
Also updates the surfaces that enumerate the control types β the page intro,
the widgets index, the Add Controls menu list, the Visibility and Interaction
with charts sections, and the URL parameter table β and records on the
Dashboard Agent page that the agent does not drive field switchers, which its
"only controls that exist on the dashboard" wording would otherwise imply.
* docs(dashboards): keep #default-option pointing at the Parent section
The new "Default option" heading sits ABOVE the Parent one, so slugification
gave it `#default-option` and pushed the pre-existing heading to
`#default-option-1`. That silently re-pointed the Parent section's own
reference at the Field switcher, and would have retargeted every inbound link
to `.../controls#default-option` β which `docs-mintlify/CLAUDE.md` asks stay
stable (claude).
The new heading takes an explicit `{#field-switcher-default-option}`, the two
references that mean it follow, and the Parent reference is left alone.
My "27 anchors, 0 missing" check could not have caught this: it collected
slugs into a set, so a duplicate collapsed into one entry and both targets
still existed β only the mapping changed. Rewritten to flag a slug produced by
more than one heading, and to diff every anchor against origin/master so a
pre-existing one that moved is an error. Both now report clean.
Also from the same review:
- "Interaction with charts" still scoped controls by *dimension*, which
describes only half a field switcher β one set to Measure scopes on a
measure. Carried the intro's "member" down, and said which control targets
which.
- Dropped the `*(none yet)*` row from the parameter table: it contradicted the
table's own lead-in, and Parent β the other parameterless control β is
already handled in the prose bullets, where the field switcher's case is
covered too.
* docs(dashboards): the Controls mapping sidebar takes measures, so say member
The **Controls mapping** subsection was written entirely in terms of
dimensions, while the section above it now says field switchers are in scope
and that you can "remap it onto a different member" β so the two disagreed
about what the sidebar accepts (claude).
The review flagged this as a genuine ambiguity it could not settle from this
repo, with two possible fixes. Checked the implementation, and it is the first
one: a measure-kind Field switcher's picker lists the view's MEASURES, not its
dimensions β deliberately, because "the dimension list would stage a mapping
the swap pipeline could never resolve" (`ReportFilterMappingSidebar.tsx`).
So the subsection gets the same "member" treatment line 299 got, and the
time-granularity restriction that was a trailing sentence becomes a table
covering every control: filters offer dimensions, time granularity switchers
time-typed dimensions, and a field switcher whichever kind it replaces.
Two consequences of that rewrite, handled here rather than left behind:
- `[ref-time-grain]` lost its only use and is removed; reference definitions
are file-scoped, so it was dead weight.
- "Mappings are also configurable by AI agents" predates this control and
would now read as covering it. Agents author FILTER / TIME_GRAIN only, so
the sentence now names those and says field switcher mappings are yours.
Also adds **Field switcher** to the product taxonomy in
`docs-mintlify/CLAUDE.md`, which governs the vocabulary this page uses and
still listed three control types.
* docs(dashboards): the third "parent control targets noβ¦" said dimension
Line 13 and line 297 make the same claim and both now say "member"; this one
still said "dimension" (claude). Since the page switched to "member" precisely
because a field switcher can target a measure, the odd one out reads as if it
were drawing a distinction it isn't.
Swept the rest of the page for the same slip. Three other "dimension" mentions
remain and all three are correct as they stand, so they are deliberately left:
the time granularity switcher "targets a single time dimension" (it does), a
parent's reset row saying "no filtering on that dimension" (a filter child,
which is dimension-scoped), and the URL paragraph's "no matching control for
that dimension" (only f_ and tg_ have parameters, both dimension-scoped).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? π Please sponsor : )