[ZEPPELIN-6588] Use theme colors in the pivot and scatter settings panels #5504
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
tbonelee
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 inglobal.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 inglobal.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 underhtml.dark .drag-tag { @import 'theme-dark'; ... }, the same patternantd-dark.lessuses.Computed styles measured in the browser, before and after (
/#/notebook/...with a%shtable 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-tagrule 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 tonotebook-visualization-page.ts, so this spec andvisualization-rendering.spec.tsshare it.Ran the new spec against the unfixed styles. The two dark tests fail on the card background (expected
rgb(31, 31, 31), receivedrgb(255, 255, 255)), and the two light tests pass. With only theglobal.lesschange reverted, the dark tests get past the cards and fail on the field label (expectedrgb(38, 38, 38), receivedrgb(250, 250, 250)). So both assertions catch the defect.With the fix, the new spec plus
visualization-rendering.spec.tspass 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
Settingshows 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