Skip to content

feat(mosaic): slide the chart tooltip between bars - #11006

Merged
austincalvelage merged 2 commits into
austin/mosaic-bar-chart-componentfrom
carp/prototype-fluid-chart-tooltip
Nov 25, 2026
Merged

austincalvelage merged 2 commits into
austin/mosaic-bar-chart-componentfrom
carp/prototype-fluid-chart-tooltip

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Description

Stacked on #10960. The chart tooltip now slides between bars instead of jumping, and the chart stops rerendering on every pointer move.

  • Slide: Chart.Tooltip sets data-moving from the first change of bar until it closes. While it's set, the styled tooltip transitions top and left, so the first open still only fades in. Under reduced motion it only fades.
  • Off screen: the tooltip uses Floating UI's hide(). While the selected bar is scrolled out of view the tooltip is hidden and carries data-anchor-hidden. Before, a keyboard-selected tooltip stayed pinned on screen.
  • Rerenders: the selection reducer now returns the same state when the pointer stays on the same bar, and dispatch skips storing it. In swingset dev (headless Chromium, 3 sweeps across the bars), React commits dropped from 321 to 71. Frames over 25 ms at 4× CPU throttle dropped from about 50 to 14.
  • Swingset: the Highlight example now follows the selection. Hovering a bar dims the others, and leaving clears the dimming.

Before

chart-tooltip-before.mp4

After

chart-tooltip-after.mp4

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 25, 2026 10:19pm UTC
mosaic-docs Ready Ready Preview Nov 25, 2026 10:19pm UTC
swingset Ready Ready Preview Nov 25, 2026 10:19pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@blacksmith-sh

blacksmith-sh Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Matches Tooltip slides between bars

On head the tooltip slides through in-between positions when the pointer changes bar, with data-moving set and opacity, top, left transitioning; on base it jumps with only opacity transitioning.

Before · Recording

Recording

Watch full video · Original footage · 0:00 Open on Jan 12 · 0:01 Move across bars · 0:06 Leave the chart

After · Recording

Recording

Watch full video · Original footage · 0:00 Open on Jan 12 · 0:01 Move across bars · 0:05 Leave the chart

Also checked · 5 match

Matches First open only fades
Matches Reduced motion only fades
Matches Tooltip hides when bar scrolls away
Matches Same-bar pointer moves skip rerenders
Matches Highlight example follows hover

Proof on a9f2a3f8 (from 19293e30) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

@austincalvelage
austincalvelage force-pushed the carp/prototype-fluid-chart-tooltip branch from 19293e3 to a9f2a3f Compare November 25, 2026 22:16
@changeset-bot

changeset-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a9f2a3f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/mosaic Minor
@clerk/mosaic-docs Patch
@clerk/swingset Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@austincalvelage
austincalvelage merged commit c771688 into austin/mosaic-bar-chart-component Nov 25, 2026
11 checks passed
@austincalvelage
austincalvelage deleted the carp/prototype-fluid-chart-tooltip branch November 25, 2026 22:29

This branch was successfully deployed

2 active deployments
Preview – swingset — a9f2a3f8 Deployed Nov 25, 2026 by vercel[bot]
Preview – clerk-js-sandbox — a9f2a3f8 Deployed Nov 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants