Repository navigation
fix(interaction): replay complete categorical brush selections - #8577
Merged
Merged
Conversation
Member
|
@dvd233 已经复现问题,并测试这个分支解决了这个问题吗? |
hustcc
approved these changes
Oct 13, 2026
Contributor
Author
|
是的,提交前已用相同回归测试对比原源码和本分支:原来单个分类 ['H'] 会错误高亮全部 5 项,['H', 'I', 'J'] 只高亮 H/I;19 个新增用例在原源码上 13 失败、6 通过,本分支全部 19 通过。其中 7 个是实际 Chart/SVG 场景,覆盖选区事件回放、有限坐标以及恢复后移动/缩放;它们派发 scenegraph 拖动事件,不是浏览器鼠标 E2E。完整测试当时为 962 通过、25 个原有跳过,Windows 的本地 LF 序列化适配和验证范围已在 PR 正文注明。当前 head 与这份已验证提交一致。 |
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.
Checklist
npm testpasses without local adaptation (Windows validation note below; upstream CI pending)Description of change
Fixes #7292.
Replaying a categorical
brush:highlightselection currently reads only its first two values. A single category such as['H']produces invalid mask coordinates, while['H', 'I', 'J']highlights only H and I. Brush events themselves emit the complete category list, so forwardingevent.data.selectioncan lose the original selection.Use the first and last domain values in
abstractOf, preserving the existing band-width adjustment. This supports single and complete multi-category selections while retaining two-endpoint and continuous selections.Add 12 scale tests and 7 Chart/SVG integration tests covering emitted-selection replay, finite mask geometry, point scales, and moving/resizing a restored brush. The integration tests dispatch scenegraph drag events; they are not browser mouse E2E tests.
Validation:
Windows validation note: both full runs use SVGO's supported
js2svg.eol: 'lf'option through a local runtime transform to match the repository's LF SVG goldens. This does not change assertions, goldens, test selection or coverage, and is not included in the PR.Prepared with AI assistance; the source change and regression evidence were reviewed before submission.