Skip to content

Tag-based filtering in dimensions/measures dropdown#9495

Open
nishantmonu51 wants to merge 3 commits into
mainfrom
nishant/tag-based-dimension-dropdown
Open

Tag-based filtering in dimensions/measures dropdown#9495
nishantmonu51 wants to merge 3 commits into
mainfrom
nishant/tag-based-dimension-dropdown

Conversation

@nishantmonu51
Copy link
Copy Markdown
Collaborator

  • Render the dropdown as a two-column layout when any dimension or measure has tags in its metrics view spec: tag list on the left, shown/hidden items on the right. Without tags, the dropdown keeps its original single-column shape.
  • Each tag row shows a tri-state visibility indicator and a visible/total count. Click the row body to filter the right column to items in that tag. Three inline actions appear on hover: Only show this tag, Show all in tag, Hide all in tag.
  • New derived selectors (dimensionTags, dimensionTagVisibilityState, dimensionsForTag and the measure mirrors) and bulk actions live under state-managers/{selectors,actions}/tags.ts. No backend or proto changes — the per-item tags: []string field is already parsed by the runtime today.
  • Drag-and-drop reorder is disabled while a tag filter or search is active, with explanatory footer text. The "at least one visible" and leaderboard sort-measure invariants are preserved via the existing setDimensionVisibility/setMeasureVisibility flow.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code

nishantmonu51 and others added 3 commits May 24, 2026 13:54
Render the dimensions and measures dropdown as a two-column layout
when any item has tags, with the tag list on the left and shown/hidden
items on the right. Clicking a tag filters the right column; per-tag
actions (only show, show all, hide all) are inline on each row.
Without tags, the dropdown keeps its original single-column shape.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a chip-style `TagInput` to the dimension and measure edit sidebar
so authors can manage tags without dropping into raw YAML. The input
suggests existing tags from the same file via a portaled autocomplete
that flips above the input when there isn't room below and clamps its
max height to the available viewport space.

Also adds `tags` to the metrics view JSON schema so the YAML editor
stops flagging it as an unknown property.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Address review feedback by collapsing the two parallel tag
implementations (inline in the dropdown vs. dead exports under
state-managers/{actions,selectors}/tags.ts) into a single pure module
at components/menu/tag-utils.ts. The dropdown now imports the helpers
directly, and the unused state-manager wiring is removed.

Tag strings are trimmed on read in both the dropdown's derivation and
the visual editor's YAML read path so accidental whitespace doesn't
create duplicate tags.

Add unit tests for the derivation, tri-state visibility, and the three
bulk actions (including the min-one invariant). Tighten the metrics
schema descriptions to mention the dashboard dropdown surface and the
trimming/case-sensitivity behavior.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant