Repository navigation
feat: @ measure picker in the adhoc measure expression input - #9953
Merged
Merged
Conversation
Typing `@` in the expression opens a picker of the referenceable measures, searchable by display name as well as field name, so users no longer need to know a measure's field name to reference it. Picking one inserts the (quoted if needed) field name. Shared by the explore dialog and the canvas inspector editor.
…measures Picked measures now render as chips showing the display name, like mentions in the AI chat, and serialize to the field name; existing expressions are tokenized into chips when the editor opens. A display name that another measure already uses is rejected. Definitions gain an optional description, carried in the `adhoc_m` URL param and the canvas YAML, and shown in tooltips instead of the expression.
AdityaHegde
requested changes
Sep 25, 2026
The "Insert a measure" buttons insert a chip into the expression editor again (they set the parent's string, which the editor only read on mount). A display name that repeats another measure's gets a numeric suffix via `getName`, following the codebase norm, instead of an error. The chip tokenizer walks the expression parser's tree, which now reports reference spans, instead of a regex.
The explore dialog and the canvas inspector editor duplicated the form fields, validation and footer. `EphemeralMeasureForm` now owns those; the two remaining files only supply the referenceable measures and persist the definition to the explore state or the component spec.
Collaborator
Author
|
The "Insert a measure" buttons were a regression from the chip editor: they set the parent string, which the editor only read on mount. They now insert a chip at the cursor (8eb73d1), covered in the e2e spec. |
AdityaHegde
approved these changes
Sep 25, 2026
nishantmonu51
added a commit
that referenced
this pull request
Sep 25, 2026
* feat: `@` measure picker in the adhoc measure expression input Typing `@` in the expression opens a picker of the referenceable measures, searchable by display name as well as field name, so users no longer need to know a measure's field name to reference it. Picking one inserts the (quoted if needed) field name. Shared by the explore dialog and the canvas inspector editor. * feat: measure chips, unique display names and descriptions for adhoc measures Picked measures now render as chips showing the display name, like mentions in the AI chat, and serialize to the field name; existing expressions are tokenized into chips when the editor opens. A display name that another measure already uses is rejected. Definitions gain an optional description, carried in the `adhoc_m` URL param and the canvas YAML, and shown in tooltips instead of the expression. * fix: adhoc measure review feedback The "Insert a measure" buttons insert a chip into the expression editor again (they set the parent's string, which the editor only read on mount). A display name that repeats another measure's gets a numeric suffix via `getName`, following the codebase norm, instead of an error. The chip tokenizer walks the expression parser's tree, which now reports reference spans, instead of a regex. * refactor: share the adhoc measure form between explore and canvas The explore dialog and the canvas inspector editor duplicated the form fields, validation and footer. `EphemeralMeasureForm` now owns those; the two remaining files only supply the referenceable measures and persist the definition to the explore state or the component spec.
8 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

@in the adhoc measure Expression field opens a picker of the referenceable measures, filtered by display name or field name as you type. Each row shows the field name next to the display name, so users learn the mapping.unexpected character "@"parse error is hidden while the picker is open.adhoc_mURL param and asdescriptionin the canvasadhoc_measuresYAML, and shown in tooltips instead of the expression.EphemeralMeasureDialog) and the canvas inspector editor (EphemeralMeasureEditor) via the new tiptap-basedMeasureExpressionInputcomponent. The tokenizer and picker filtering live inmeasure-mention.tswith unit tests, and the pivot e2e spec covers the picker, description and duplicate-name flows.Addresses the feedback in this Slack thread.
Checklist: