Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v5 #7682 +/- ##
==========================================
+ Coverage 94.43% 94.46% +0.03%
==========================================
Files 188 188
Lines 10099 10100 +1
Branches 2201 2201
==========================================
+ Hits 9537 9541 +4
- Misses 516 559 +43
+ Partials 46 0 -46
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This branch has not been deployed
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
AutoAdaptLabel's first-render guard after the initial full label scan.Why
isFirstRenderwas initialized totruebut never reset, sogetLabelElementsInView()was unreachable. Every later label recomputation therefore continued to sort and collision-check the full element map, even after the graph had been zoomed into a smaller viewport.The initial full scan is preserved for first-render correctness; later updates now use the existing viewport-filtered path.
Fixes #7675
Validation
pnpm --filter @antv/g6 exec jest __tests__/unit/behaviors/auto-adapt-label.spec.ts --runInBand -t "uses viewport filtering after the first render"✅pnpm --filter @antv/g6 type-check✅pnpm --filter @antv/g6 lint✅git diff --check✅The complete existing
auto-adapt-label.spec.tssuite still has four pre-existing SVG snapshot failures in this environment (expected: undefined,received: undefined); the new regression test passes. The snapshot failures reproduce on the unmodified baseline.Codex was used to prepare the patch; the diff and validation results were reviewed before submission.