← Back to Pull requests

[ZEPPELIN-6588] Use theme colors in the pivot and scatter settings panels #5504

Closed
unknown closed this pull request without merging on Sep 27, 2026 08:27 UTC
View on GitHub
unknown unknown commented on Sep 26, 2026 11:06 UTC
Author

What is this PR for?

In dark mode the Pivot and Scatter visualization settings panels were unreadable. Both components hard-coded light backgrounds on their cards (#fff) and card headers (#fafafa), but the card titles take the theme's heading color. So in dark mode the titles were near-white text on a white background. The field labels (.drag-tag, defined in global.less) also stayed light.

This PR replaces those values with the existing theme variables. It adds no new colors, and the light theme resolves to the same values as before.

| Element | Before | After |
|---|---|---|
| Card background | #fff | @component-background |
| Card header background | #fafafa | @background-color-light |
| Field label text / background / border | rgba(0,0,0,.65) / #fafafa / #d9d9d9 | @text-color / @background-color-light / @border-color-base |

The cards already sit inside .themeMixin(...), so their fix is a one-line swap in each file. The field label styles are only used by these two panels, but they stay in global.less. The CDK drag preview is appended to <body>, outside the component host, so a component-scoped rule would not reach the label being dragged. Dark values are applied under html.dark .drag-tag { @import 'theme-dark'; ... }, the same pattern antd-dark.less uses.

Computed styles measured in the browser, before and after (/#/notebook/... with a %sh table paragraph, Pivot through the Bar Chart and Scatter through the Scatter Chart):

| Dark theme | Before | After |
|---|---|---|
| Card | rgb(255, 255, 255) | rgb(31, 31, 31) |
| Card header | rgb(250, 250, 250) | rgb(38, 38, 38) |
| Card title | rgba(255, 255, 255, 0.95) (on white) | rgba(255, 255, 255, 0.95) |
| Field label bg / text | rgb(250, 250, 250) / rgba(0, 0, 0, 0.65) | rgb(38, 38, 38) / rgba(255, 255, 255, 0.85) |
| Drag preview (child of <body>) | same as field label, light | rgb(38, 38, 38) / rgba(255, 255, 255, 0.85) |

The "before" row matches the values in the Jira report. In the light theme, every value above is identical before and after, including the drag preview. The compiled .drag-tag rule is character-for-character the same as before.

What type of PR is it?

Bug Fix

Todos

[x] Use theme variables for the Pivot and Scatter settings card and header backgrounds
[x] Theme the field labels, including the drag preview
[x] Add Playwright coverage for both panels in both themes

What is the Jira issue?

ZEPPELIN-6588

How should this be tested?

Done:

New spec e2e/tests/theme/visualization-settings-theme.spec.ts: Pivot and Scatter, each in light and dark (4 tests). Each test checks every card, card header and card title, plus a field label, against the theme's resolved colors. The table paragraph fixture moved to notebook-visualization-page.ts, so this spec and visualization-rendering.spec.ts share it.
Ran the new spec against the unfixed styles. The two dark tests fail on the card background (expected rgb(31, 31, 31), received rgb(255, 255, 255)), and the two light tests pass. With only the global.less change reverted, the dark tests get past the cards and fail on the field label (expected rgb(38, 38, 38), received rgb(250, 250, 250)). So both assertions catch the defect.
With the fix, the new spec plus visualization-rendering.spec.ts pass on chromium, firefox and webkit: 19 passed, no retries.
npm run test:shell: 131 passed. npm run lint: exit 0, with the same warning count as master.
Manual check on a local server in both themes: card titles and field labels are readable, dragging a field between Keys/Groups/Values still works, and the light theme looks unchanged.

Notes:

Not tagged with @NB-PARITY-060 (theme). That scenario's action is changing the theme while a notebook is mounted, but this spec sets the theme in localStorage and reloads. Tagging it would also mean updating the registry coverage that ZEPPELIN-6640 tracks.
Drag-and-drop was checked by hand but has no new automated coverage. Behavior coverage for these panels is ZEPPELIN-6514.
Unrelated existing behavior found while testing, present on master too: reload a note whose saved mode is Scatter, switch to Bar and back to Scatter, and the Scatter settings panel stays hidden while Setting shows it as open. Each test here uses a fresh note, so it does not hit this.

Screenshots (if appropriate)

N/A. The computed-style tables above record the before/after values.

Questions:

Does the license files need to update? No. The new spec has the ASF header.
Is there breaking changes for older versions? No. Light theme output is unchanged.
Does this needs documentation? No.

🤖 Generated with Claude Code

Diff: 606 lines (+454 / -152) across 7 files Reviewer: tbonelee Review duration: 1280m
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 606 lines diff across 7 files
0.50
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.383
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5504"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 50.1% (MEDIUM) · Higher = larger blast radius
50.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 19.8% · Safe to merge
19.8%