You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: cover SVG coordinate changes between pointer samples - #226
Extend the existing SVG coordinate test to cover ancestor translation, preceding layout movement and scrolling between pointer samples, without resizing or re-rendering the chart.
The matrix mock now captures its coefficients when read, like a browser matrix snapshot. A cached matrix must not appear to update itself through a test closure.
Related to @toomingos's report in #203. This protects existing behavior while the remaining pointer-coordinate optimization is investigated. It does not fix or close the remaining performance report.
Verification
All 19 pnpm validate tasks pass, including 2,237 main tests, type checks, packed consumers, docs and bundle gates.
Maintained example builds pass. All 188 regenerated SVG previews are unchanged.
Chromium, Firefox and WebKit reproduce stale coordinates for all three movements when a matrix is cached until resize or scene update.
A private mutation run that caches the first matrix fails the extended test by 42.38 px. The real implementation passes.
No runtime files, package versions, dependencies, bundle budgets or CI jobs change. No Changeset is needed for test coverage alone.
The preview manifest is regenerated because the existing source fingerprint includes test files.
Summary by CodeRabbit
Tests
Expanded coverage for chart coordinate mapping when an SVG moves on screen, including horizontal and vertical movement. This verifies that interactions remain aligned with the chart’s current position, even when its size and rendered scene have not changed. No user-facing functionality changes are included.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID: eae63dce-2a63-489a-bd71-78a8061585a7
📥 Commits
Reviewing files that changed from the base of the PR and between a66cdbf and 8873b45.
📒 Files selected for processing: 2
benchmarks/conformance/previews/manifest.json
packages/charts-core/src/svg-surface.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
📝 Walkthrough
The SVG coordinate-mapping test now checks results after horizontal and vertical movement between samples. The conformance preview manifest’s sourceHash value also changed.
Changes: SVG Coordinate Mapping
Layer / File(s)
Summary
Coordinate mapping test updates packages/charts-core/src/svg-surface.test.ts
The test mock accounts for current horizontal and vertical translations. The test checks coordinate mapping after positive horizontal and vertical movement and negative vertical movement.
The added test coverage and manifest update present no identified blocker to merging after normal checks.
Pre-merge checks: 5
Passed checks: 5 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: extending SVG coordinate tests to cover coordinate changes between pointer samples.
Docstring Coverage
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
✨ 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.
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
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.
What changed
Extend the existing SVG coordinate test to cover ancestor translation, preceding layout movement and scrolling between pointer samples, without resizing or re-rendering the chart.
The matrix mock now captures its coefficients when read, like a browser matrix snapshot. A cached matrix must not appear to update itself through a test closure.
Related to @toomingos's report in #203. This protects existing behavior while the remaining pointer-coordinate optimization is investigated. It does not fix or close the remaining performance report.
Verification
pnpm validatetasks pass, including 2,237 main tests, type checks, packed consumers, docs and bundle gates.The preview manifest is regenerated because the existing source fingerprint includes test files.
Summary by CodeRabbit