fix: move tooltips to the sides on line charts to free the view#2688
fix: move tooltips to the sides on line charts to free the view#2688graphieros wants to merge 6 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughAdds a composable that computes chart tooltip placement from mouse position, integrates it into TimelineChart and TrendsChart (wiring a chartRef), adds unit tests, and bumps vue-data-ui to 3.19.4. ChangesDynamic Chart Tooltip Positioning
Possibly Related PRs
Suggested Reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
e18e dependency analysisNo dependency warnings found. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/unit/app/composables/use-chart-tooltip-position.spec.ts`:
- Around line 15-17: The test stubs globals (vi.stubGlobal for 'HTMLElement',
'computed', and 'toValue') but does not restore them, causing state leak; add an
afterEach hook that calls vi.unstubAllGlobals() to restore all globals after
each test so MockHTMLElement, computed, and toValue do not persist between
tests; place the afterEach alongside the existing vi.stubGlobal calls in
use-chart-tooltip-position.spec.ts so the cleanup always runs after each test
case.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: da08de07-d34f-4dbf-8551-e921b13a5af5
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
app/components/Package/TimelineChart.vueapp/components/Package/TrendsChart.vueapp/composables/useChartTooltipPosition.tspackage.jsontest/unit/app/composables/use-chart-tooltip-position.spec.ts
This small improvement moves chart tooltips to the left or right side of the client position to free up the view on line charts and allow a better vision of the selected datapoints.
The tooltip is moved to the left side when the client hovers the right side of the chart area, and vice-versa.
Only the line charts were updated with this feature:
Other: