Skip to content

feat: support wider tags in dimension/measure selectors and pivot tables#9614

Merged
nishantmonu51 merged 4 commits into
mainfrom
tags_width
Jun 26, 2026
Merged

feat: support wider tags in dimension/measure selectors and pivot tables#9614
nishantmonu51 merged 4 commits into
mainfrom
tags_width

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator

Adds resizable, content-aware tag columns to the dimension/measure selector (explore) and the pivot sidebar, so long tag names are readable instead of being clipped at a fixed width.

  • Tags column now auto-fits its content (within min/cap bounds) and exposes a draggable divider to set an explicit width; the choice is persisted to localStorage.
  • Pivot sidebar is wrapped in a resizable pane with its own draggable divider; width persists and falls back to the legacy tag-aware default (240px without tags, 400px with) until dragged.
  • New detectOverflow action shows a tooltip with the full tag name only when the label is actually truncated.
  • localStorageStore now guards reads and writes in try/catch so it degrades to in-memory state when localStorage is unavailable (e.g. sandboxed/storage-partitioned embed iframes raising SecurityError).

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

- Auto-fit tags column (capped) in the explore selector and pivot sidebar
- Resizable tags column divider with persisted width on both surfaces
- Resizable sidebar/table divider in the pivot view
- Tooltip showing the full tag name when it is truncated

Pivot sidebar keeps its legacy tag-aware initial width (240px without
tags, 400px with tags) until the user drags the divider. Persist pivot
sidebar width and tag column widths via the shared dashboard-layout-store
(alongside the timeseries/TDD split sizes).

Harden localStorageStore to degrade to in-memory only when storage is
unavailable (e.g. sandboxed/partitioned embed iframes) instead of
throwing on read/write.

@AdityaHegde AdityaHegde left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are missing tooltips on dimension/measures. Also we should increase the minimums, lowest possible width barely shows anything,
Image

Comment thread web-common/src/features/dashboards/pivot/PivotTagRow.svelte Outdated
*/
export type OverflowCallback = (isOverflowing: boolean) => void;

export function detectOverflow(node: HTMLElement, callback: OverflowCallback) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there is a way to do two way binding and avoid the callback. For svelte 5 we will have to have a class and add a memeber for $state to get shared.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the callback action. The class-with-$state pattern only works in runes-mode components, but here its used in PivotChip and DashboardMetricsDraggableList, which are still Svelte 4 — so a runes class can't serve them, and keeping to callback is the standard action contract. Maybe we can do it as part of future svelte.5 migration completion ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya we can do it as part of the migration

- Pivot chips show the display name (and description) and surface the
  tooltip on truncation even without a description.
- Tag rows use the tooltip component instead of the native title
  attribute, disabled when the label is not clipped.
- Raise the tag column minimum widths so a dragged-narrow column still
  shows a usable portion of the tag name.
@nishantmonu51 nishantmonu51 merged commit b466337 into main Jun 26, 2026
13 checks passed
@nishantmonu51 nishantmonu51 deleted the tags_width branch June 26, 2026 10:46
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.

2 participants