test(treemap): pin border-free labels so tiles render without seams - #43890
Conversation
Treemap labels used to carry a 1px border in the theme background color. ECharts sizes that box to the full node height, so every tile showed a vertical line right after its label. The border was removed in #37808, but nothing guarded against it coming back; #43862 reports the symptom on an older build. This test walks every label/upperLabel style in the transformed options and asserts none declares a border. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015XdpWLXhUs7r8d4F2R5D6F
Code Review Agent Run #d6d129Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #43890 +/- ##
=======================================
Coverage 79.45% 79.45%
=======================================
Files 2895 2895
Lines 168167 168167
Branches 38995 38995
=======================================
+ Hits 133616 133623 +7
+ Misses 32052 32045 -7
Partials 2499 2499
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
SUMMARY
Regression test for the Treemap "vertical line inside every tile" symptom reported in #43862.
The line came from a 1px
borderColor/borderWidthon the label style. ECharts sizes the label's text box to the full node height (via the treemap view'sbeforeUpdatehook), so the box border rendered as a vertical line right after the label text, spanning the whole tile. #37808 removed the border and the symptom is gone onmaster(the reporter's screenshot also shows the inter-node gaps that #40181 removed, so their build predates both fixes; the border was still present in the 6.0.0 release).Nothing pinned that fix, so this adds a test that walks every
label/upperLabelstyle in the transformed options (series, emphasis, levels, upper labels, and the filtered-node label) and asserts none of them declares a border. Verified the test fails if the oldborderColor/borderWidthpair is reintroduced onlabelProps, and passes onmaster.Rendered the pre-#37808 options with both ECharts 5.6.0 and 6.1.0 to confirm the mechanism; both draw the same line the reporter sees:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A, test-only.
TESTING INSTRUCTIONS
To see it fail, add
borderColor: theme.colorBgBase, borderWidth: 1back tolabelPropsinsrc/Treemap/transformProps.ts.ADDITIONAL INFORMATION
masterby fix: Vertical lines in the middle of Treemap categories #37808; this pins it)🤖 Generated with Claude Code
https://claude.ai/code/session_015XdpWLXhUs7r8d4F2R5D6F