Skip to content

Fix chart category and unit labels invisible in dark mode - #555

Closed
Alexi5000 wants to merge 1 commit into
NVIDIA:mainfrom
Alexi5000:fix/466-chart-labels-dark-mode
Closed

Alexi5000 wants to merge 1 commit into
NVIDIA:mainfrom
Alexi5000:fix/466-chart-labels-dark-mode

Conversation

@Alexi5000

@Alexi5000 Alexi5000 commented Nov 17, 2026 •

Copy link
Copy Markdown

Fixes #466

The renderers emit
esult-chart-cat\ and
esult-chart-unit\ classes, but globals.css only styled
esult-chart-catlabel, so both fell back to black fill. Add the actually-emitted selectors to the fill rule.

Tested: pnpm lint/build pass.

Summary by CodeRabbit

  • Style
    • Improved text styling consistency for chart category and unit labels.

The renderers emit result-chart-cat and result-chart-unit classes, but
globals.css only styled result-chart-catlabel, so both fell back to black
fill. Add the actually-emitted selectors to the fill rule.

Fixes NVIDIA#466

Signed-off-by: Alex Cinovoj <alexjobs23@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The shared SVG text-style selector now includes the chart category and unit label classes.

Changes: Chart text styling

Layer / File(s) Summary
Add chart label selectors
frontend/app/globals.css
The shared text-style selector now includes .result-chart-cat and .result-chart-unit. The .result-chart-catlabel selector remains.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: Minimal · up to 10c88

This is a small CSS fix that makes chart category and unit labels use the muted chart color so they stay readable in dark mode. It carries essentially no merge risk.

Architecture risk: Low · up to 10c88

The change affects 1 system.

Changed systems: frontend

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — frontend (ui) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in frontend/app/globals.css: The shared text-style selector now includes .result-chart-cat and .result-chart-unit; .result-chart-catlabel remains included.
Pre-merge checks: Passed 6

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Fix chart category and unit labels invisible in dark mode" matches the change. The PR adds the emitted .result-chart-cat and .result-chart-unit selectors to the CSS fill rule in globals.css…
Linked Issues check Passed Issue #466 requires a CSS fill rule for the emitted result-chart-cat and result-chart-unit classes so that chart category and unit labels use --result-chart-muted in dark mode. The whole-PR diff…
Out of Scope Changes check Passed The whole-PR diff contains one hunk in frontend/app/globals.css, limited to the chart text fill selector list. The added selectors are the exact classes named in issue #466. No unrelated files or de…
Tests For Backend Behaviour Changes Passed The check applies only when a PR changes behaviour under auto_ontology/. The reviewed range changes one file: frontend/app/globals.css (status M). No file under auto_ontology/ changed, so no backend b…
Migration Accompanies Schema Change Passed The check applies only when auto_ontology/dal/schema.py is modified. The reviewed range (refs/coderabbit/pre-merge-check/base to head) changes one file: M frontend/app/globals.css. No path in …
Full details: Title check

Explanation

The title "Fix chart category and unit labels invisible in dark mode" matches the change. The PR adds the emitted .result-chart-cat and .result-chart-unit selectors to the CSS fill rule in globals.css, which fixes those labels falling back to black in dark mode. The title describes the main change and matches the linked issue. It does not follow the repository's imperative style guidance exactly, because it starts with "Fix" (acceptable imperative) and has no ticket ID or WIP marker, so it meets the stated requirements.

Full details: Linked Issues check

Explanation

Issue #466 requires a CSS fill rule for the emitted result-chart-cat and result-chart-unit classes so that chart category and unit labels use --result-chart-muted in dark mode. The whole-PR diff (merge base a630ebd to head 10c88af) changes only frontend/app/globals.css. It adds .result-chart-cat and .result-chart-unit to the existing rule that sets fill: var(--result-chart-muted) and font-size: 10px. This matches the issue's suggested fix. At head, ResultChart.tsx builds the class as result-chart-${mark.variant === 'value' ? 'vallabel' : mark.variant}, so text marks with variant cat or unit receive these classes and now match the rule. Tick and value label selectors are unchanged. The issue's report of the cat and unit variants came from the issue text. I did not inspect the renderer files to confirm the variants directly. No automated test was added. The issue lists no test requirement. The PR description reports that lint and build pass.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff contains one hunk in frontend/app/globals.css, limited to the chart text fill selector list. The added selectors are the exact classes named in issue #466. No unrelated files or declarations changed. The retained .result-chart-catlabel selector is an existing selector and is not a new change.

Full details: Tests For Backend Behaviour Changes

Explanation

The check applies only when a PR changes behaviour under auto_ontology/. The reviewed range changes one file: frontend/app/globals.css (status M). No file under auto_ontology/ changed, so no backend behaviour change exists and the test requirement does not apply. The change adds .result-chart-cat and .result-chart-unit to an existing CSS fill rule for PR #555 (linked issue #466). This is a frontend style change and falls outside the check's scope.

Full details: Migration Accompanies Schema Change

Explanation

The check applies only when auto_ontology/dal/schema.py is modified. The reviewed range (refs/coderabbit/pre-merge-check/base to head) changes one file: M frontend/app/globals.css. No path in the diff matches schema.py or alembic. The schema file exists in the repository, but this PR does not touch it. No Alembic revision is required, so the check is inapplicable and passes. The PR is a CSS-only fix that adds .result-chart-cat and .result-chart-unit to the existing fill rule for issue #466. Primary PR: NVIDIA/auto-ontology #555, author Alexi5000.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7dac5ff and 10c88af.

Files selected for processing: 1

  • frontend/app/globals.css

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@Alexi5000 Alexi5000 closed this Nov 18, 2026
@Alexi5000

Copy link
Copy Markdown
Author

Closing to avoid duplicating #539, which already covers this fix and is awaiting code-owner review. Thanks for the heads-up @sandeepvijayarao09.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chart category and unit labels have no CSS rule and render black (invisible in dark mode)

1 participant