Skip to content
Source
Sign inSign up
TanStack/charts

Let custom tooltip shadows paint outside the portal #255

Mergedtannerlinsleymerged 2 commits intomain fromtaren/portal-overflow-current-1943merged by tannerlinsley

tannerlinsleycommented

Addresses #168. The tooltip portal lets a custom card's shadow paint outside the portal surface. The card still controls its own rounded clipping. Thanks to @stybo for reporting the bug.

The renderer regression checks the portal overflow style. All 117 focused tests and the existing 146-row bundle policy passed on current main. The approved comparison fingerprint and matching docs are refreshed. The catalog generator produced 189 byte-identical SVGs, so only its source fingerprint changed. Numeric bundle limits and recorded measurements are unchanged.

The issue stays open until the fix is available in a release.

Summary by CodeRabbit

  • Bug Fixes
    • Custom tooltip shadows now remain visible when tooltips appear in popovers, instead of being clipped.
    1. 🦋 Changeset detected

      Latest commit: 76e937d8567d7d12b54b3751f8fc0894c3176af7

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

      This PR includes changesets to release 12 packages
      NameType
      @tanstack/chartsPatch
      @tanstack/alpine-chartsPatch
      @tanstack/angular-chartsPatch
      @tanstack/lit-chartsPatch
      @tanstack/octane-chartsPatch
      @tanstack/preact-chartsPatch
      @tanstack/react-chartsPatch
      @tanstack/react-native-chartsPatch
      @tanstack/solid-chartsPatch
      @tanstack/svelte-chartsPatch
      @tanstack/vue-chartsPatch
      @tanstack/charts-scalesPatch

      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

    2. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Explain Change →

      No actionable comments were generated in the recent review.

      Walkthrough

      The tooltip portal now sets the tooltip element’s overflow to visible. The portaled-tooltip test checks this style. A patch changeset and benchmark and comparison records also changed.

      Changes: Tooltip portal overflow

      Layer / File(s)Summary
      Set tooltip portal overflow
      packages/charts-core/src/tooltip-portal.ts, packages/charts-core/src/renderer.test.ts, .changeset/tooltip-portal-overflow.md
      configureParent sets the tooltip element’s overflow to visible. The portaled-tooltip test expects this value. A patch changeset describes the tooltip shadow behavior.
      Update comparison records
      benchmarks/comparison/bundle-baseline.json, benchmarks/conformance/previews/manifest.json, docs/comparison.md, packages/charts-core/docs/comparison.md
      The benchmark revision and hashes are updated. The comparison pages identify revision 6816b34; competitor package pins remain unchanged.

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix

      Possibly related issues

      • TanStack/charts#168: The issue describes custom tooltip portal rendering that lets the tooltip shadow paint outside the portal surface while retaining rounded clipping.

      Suggested reviewers: greglum

      Merge Risk: Minimal · up to 76e93

      The tooltip shadow behavior is implemented without removing the custom card’s clipping, so the change is mergeable.

      Pre-merge checks: Passed 4 · Failed 1
      Failed Failed checks: 1 warning
      Check nameStatusExplanationResolution
      Docstring CoverageWarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…Write docstrings for the functions missing them to satisfy the coverage threshold.
      Passed Passed checks: 4 passed
      Check nameStatusExplanation
      Description CheckPassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title checkPassedThe title "Let custom tooltip shadows paint outside the portal" matches the main change in the changeset. The code change in packages/charts-core/src/tooltip-portal.ts sets the tooltip element's overf…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Title check

      Explanation

      The title "Let custom tooltip shadows paint outside the portal" matches the main change in the changeset. The code change in packages/charts-core/src/tooltip-portal.ts sets the tooltip element's overflow style to visible in configureParent, and the test in renderer.test.ts was updated to expect that value. The PR objectives describe the same fix for issue #168, which allows a custom tooltip card's shadow to paint outside the portal surface. The other changes are benchmark, manifest, and docs refreshes that the title does not need to cover.

      Full details: Docstring Coverage

      Explanation

      Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files. (5 skipped: 5 unsupported.)

      Resolution

      Write docstrings for the functions missing them to satisfy the coverage threshold.

      Finishing Touches
      Generate docstrings
      • Commit to this branch
      • Create a new PR
      Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      Share
      Recent review info
      Run configuration
      • Source mode: Auto
      • Repository: Unavailable
      • Branch: Unavailable
      • File: No configuration file from this repository applied
      • Commit: Unavailable
      • Layers: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 2c414e7d-acb9-46f4-97e1-7cbc4b14edb2
      Commits

      Reviewing files that changed from the base of the PR and between 7be9c414ee5d4301ff35915d755caefdfe99c5a7 and 76e937d8567d7d12b54b3751f8fc0894c3176af7.

      Files selected for processing: 7
      • .changeset/tooltip-portal-overflow.md
      • benchmarks/comparison/bundle-baseline.json
      • benchmarks/conformance/previews/manifest.json
      • docs/comparison.md
      • packages/charts-core/docs/comparison.md
      • packages/charts-core/src/renderer.test.ts
      • packages/charts-core/src/tooltip-portal.ts

      Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

    3. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit 76e937d8567d7d12b54b3751f8fc0894c3176af7

      CommandStatusDurationResult
      nx run charts-workspace:ci-distributed✅ Succeeded4m 47sView ↗
      nx run charts-workspace:package-check✅ Succeeded2m 24sView ↗
      nx run charts-workspace:benchmark-check✅ Succeeded1m 7sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-11-04 05:08:25 UTC

    4. tannerlinsley merged this72e38ad

    5. tannerlinsley closed this

Sign in to join this conversation.