Repository navigation
fix(charts): the bar tooltip renders in <body> and flips below when there is no room above (#3264) - #3267
Merged
Conversation
…here is no room above (#3264) On the Workspace agent band the activity chart is 23px tall, sits just under the page header and inside ScanlineReveal's clip-path. The tooltip was an `absolute bottom-full` child of the bar, so it always opened upward and its top rows (the date, the top buckets) were covered. StackedBarChart now teleports one tooltip to <body>, position: fixed, placed from the hovered bar's rect: above when it fits, below when it does not, clamped 8px inside the viewport on every side. It stays hidden until measured and follows the bar through scroll and resize. Applies to every caller (Workspace band, agent Overview, canvas charts). Fixes #3264 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
ScanlineReveal'sclip-path. The bar tooltip was anabsolute bottom-fullchild of the bar, so it always opened upward and its top rows (the date, the top buckets) were covered.StackedBarChartnow renders one tooltip through<Teleport to="body">withposition: fixedandz-50, placed from the hovered bar's rect. No parent can clip or cover it.Changes
src/frontend/src/components/StackedBarChart.vuesrc/frontend/tests/unit/stackedBarChartTooltip.mount.spec.js(new mount spec, jsdom)Test Plan
npx vitest run tests/unit/stackedBarChartTooltip.mount.spec.js: 6 passed, and all 6 fail against the old component. The cases:<body>, outside the chart;npm run check:tokensOK.sales-companion, light and dark: hovering a bar shows the full tooltip (date, buckets, total) drawn over the header, not under it.Fixes #3264
🤖 Generated with Claude Code