Skip to content

fix(dashboard): use theme border for chart tiles - #41661

Closed
YinkaMetrics wants to merge 1 commit into
apache:masterfrom
YinkaMetrics:yinka/dashboard-chart-border
Closed

fix(dashboard): use theme border for chart tiles#41661
YinkaMetrics wants to merge 1 commit into
apache:masterfrom
YinkaMetrics:yinka/dashboard-chart-border

Conversation

@YinkaMetrics

@YinkaMetrics YinkaMetrics commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

SUMMARY

  • add a resting chart tile border using the active theme colorBorder token
  • keep the existing border radius token on chart holders
  • add DashboardBuilder coverage for the chart holder border styles

Closes #41618

SCREENSHOTS

Captured from a local Superset Sales Dashboard with example data loaded.

Before:

Before chart tile border change

After:

After chart tile border change

TESTING INSTRUCTIONS

  • env NODE_ENV=test NODE_OPTIONS=--max-old-space-size=8192 node_modules/.bin/jest --config jest.config.js --silent --runInBand src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx
  • superset-frontend/node_modules/.bin/prettier --check superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx
  • git diff --check

@dosubot dosubot Bot added change:frontend Requires changing the frontend dashboard:design Related to the Dashboard UI/UX labels Jul 2, 2026
@bito-code-review

bito-code-review Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #fe93f0

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: c12a9be..c12a9be
    • superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx
    • superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
  • Files skipped - 0
  • Tools
    • 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 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

@sadpandajoe

Copy link
Copy Markdown
Member

@YinkaMetrics can you add a before and after screenshot into the description

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.61%. Comparing base (46a153d) to head (744d526).
⚠️ Report is 20 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #41661      +/-   ##
==========================================
- Coverage   64.61%   64.61%   -0.01%     
==========================================
  Files        2684     2684              
  Lines      148514   148513       -1     
  Branches    34263    34262       -1     
==========================================
- Hits        95969    95962       -7     
- Misses      50786    50792       +6     
  Partials     1759     1759              
Flag Coverage Δ
javascript 69.40% <100.00%> (-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.

@YinkaMetrics

YinkaMetrics commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Updated the PR description with real before/after screenshots captured from the local Superset Sales Dashboard. Thanks for the prompt.

@aminghadersohi aminghadersohi 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.

Reviewed. Scans N/A (trivial TS/Emotion diff, +22/-2). theme.colorBorder matches the precedent from #35199 and is already used elsewhere in this file (empty-droptarget border, fade-out box-shadow), resolves correctly in both light/dark via antd's alias-token algorithm. box-sizing: border-box prevents layout shift from the new border. The border-radius consolidation into the base rule is a reasonable, disclosed DRY cleanup (both .fade-in/.fade-out used the same value). Test asserts the real themed values via supersetTheme and follows the file's existing toHaveStyleRule/target pattern — not vacuous. No findings.

@YinkaMetrics
YinkaMetrics force-pushed the yinka/dashboard-chart-border branch from c12a9be to 81caebd Compare July 3, 2026 01:27
@bito-code-review

bito-code-review Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #77c467

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 81caebd..81caebd
    • superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx
    • superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
  • Files skipped - 0
  • Tools
    • 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 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

@aminghadersohi aminghadersohi 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.

Re-review at new HEAD (author force-pushed a rewritten implementation). The new version routes through the existing opt-in dashboardTileBorder/dashboardTileBorderRadius override tokens instead of hardcoding colorBorder — an improvement over the prior version since it respects operator overrides. Two items:

  • superset-frontend/packages/superset-core/src/theme/types.ts:254 documents these tokens' fallback as "no border" — this PR intentionally flips that default to a themed border (the fix for #41618) but doesn't update the now-stale comment. Not blocking, worth a one-line fix alongside.

See inline comment for the blocking item (failing required CI gate).

width: 100%;
height: 100%;
background-color: ${theme.dashboardTileBg ?? theme.colorBgContainer};
border: ${theme.dashboardTileBorder ??

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.

HIGH: the pre-commit (current) required check is failing at this HEAD — prettier-frontend reformats this file (files were modified by this hook). Run prettier --write (or the repo's pre-commit hook) locally and push the formatted version; this blocks merge as-is.

@bito-code-review

Copy link
Copy Markdown
Contributor

To resolve the failing pre-commit check, you need to run the project's Prettier formatting command locally. Since the prettier-frontend hook identified that superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx requires reformatting, please execute the following command in your terminal:

npm run prettier -- --write superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx

After running this command, stage the changes and push them to your branch. This will ensure the file adheres to the project's style guidelines and allow the pre-commit check to pass.

@YinkaMetrics
YinkaMetrics force-pushed the yinka/dashboard-chart-border branch from 81caebd to 744d526 Compare July 3, 2026 18:33
@netlify

netlify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 744d526
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a480087f900e400087b33bb
😎 Deploy Preview https://deploy-preview-41661--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@bito-code-review

bito-code-review Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #db62b3

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx - 1
    • Semantic behavior change · Line 339-341
      Removing `border` from `.fade-out` changes conditional behavior. Previously when `dashboardTileBorder` was undefined, `fade-out` had no border (fallback to `'none'`). Now it inherits the base `border: 1px solid ${theme.colorBorder}` by default. This regression may cause visual inconsistency in the `fade-out` state unless that was the intended change.
Review Details
  • Files reviewed - 3 · Commit Range: 744d526..744d526
    • superset-frontend/packages/superset-core/src/theme/types.ts
    • superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx
    • superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
  • 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 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

@aminghadersohi aminghadersohi 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.

Both prior findings addressed: border/border-radius are now single-line (79/80 chars, matches the file's existing style and prettier's 80-char default), and the types.ts:254 comment now correctly says "colorBorder border" instead of "no border". No new issues from a full re-scan.

On Bito's fade-out "regression" note: that's the intended behavior, not a bug — the whole point of this fix (#41618) is that the border should be consistent across all states (resting/fade-in/fade-out) rather than only appearing conditionally in .fade-out. Reverting that would reintroduce the original issue.

Note: CI hasn't actually executed at this HEAD yet (action_required — pending maintainer approval to run Actions for a first-time contributor's fork PR), so this isn't a green-CI confirmation, just a code-level check.

@rusackas

rusackas commented Jul 5, 2026

Copy link
Copy Markdown
Member

Thanks @YinkaMetrics, you got to the right approach first here (the dashboardTileBorder ?? colorBorder fallback seems right). But #41731 landed the same change with green CI and a bit more test coverage, so we're likely to merge that one and close this. Let me know if I'm misconstruing anything, and thanks for this and future contributions!

@rusackas

rusackas commented Jul 5, 2026

Copy link
Copy Markdown
Member

Merged #41731, so I'll indeed close this after all, but let me know if you think there's more to address, and we can certainly reopen/revisit this. Thanks again!

@rusackas rusackas closed this Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend dashboard:design Related to the Dashboard UI/UX packages size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard chart tiles (.dashboard-component-chart-holder) don't use colorBorder token — no visible boundary in either theme mode

4 participants