Skip to content

test(treemap): pin border-free labels so tiles render without seams - #43890

Merged
rusackas merged 1 commit into
masterfrom
test/treemap-label-no-border
Sep 4, 2026
Merged

test(treemap): pin border-free labels so tiles render without seams#43890
rusackas merged 1 commit into
masterfrom
test/treemap-label-no-border

Conversation

@rusackas

@rusackas rusackas commented Sep 4, 2026

Copy link
Copy Markdown
Member

SUMMARY

Regression test for the Treemap "vertical line inside every tile" symptom reported in #43862.

The line came from a 1px borderColor/borderWidth on the label style. ECharts sizes the label's text box to the full node height (via the treemap view's beforeUpdate hook), 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 on master (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 / upperLabel style 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 old borderColor/borderWidth pair is reintroduced on labelProps, and passes on master.

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:

treemap label border artifact

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A, test-only.

TESTING INSTRUCTIONS

cd superset-frontend
npx jest --runInBand plugins/plugin-chart-echarts/test/Treemap/transformProps.test.ts

To see it fail, add borderColor: theme.colorBgBase, borderWidth: 1 back to labelProps in src/Treemap/transformProps.ts.

ADDITIONAL INFORMATION

🤖 Generated with Claude Code

https://claude.ai/code/session_015XdpWLXhUs7r8d4F2R5D6F

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
@bito-code-review

bito-code-review Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #d6d129

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: b0c8c7b..b0c8c7b
    • superset-frontend/plugins/plugin-chart-echarts/test/Treemap/transformProps.test.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.45%. Comparing base (e1ce6b6) to head (b0c8c7b).
⚠️ Report is 3 commits behind head on master.

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           
Flag Coverage Δ
javascript 75.01% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SBIN2010 SBIN2010 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rusackas , that's a good addition.

@rusackas
rusackas merged commit ee03ee1 into master Sep 4, 2026
85 checks passed
@rusackas
rusackas deleted the test/treemap-label-no-border branch September 4, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants