Skip to content

fix(ui): Re-add dark theme support#19385

Merged
dvail merged 3 commits intodv/ROX-28622-pf-6from
dv/pf-6-dark-theme
Mar 13, 2026
Merged

fix(ui): Re-add dark theme support#19385
dvail merged 3 commits intodv/ROX-28622-pf-6from
dv/pf-6-dark-theme

Conversation

@dvail
Copy link
Contributor

@dvail dvail commented Mar 11, 2026

Description

PatternFly 6 with dark theme support.

The main changes to support this:

  • Revert deletion of dark-theme css in https://github.com/stackrox/stackrox/pull/17934/changes
  • Revert commenting out of theme switcher components in https://github.com/stackrox/stackrox/pull/13436/changes and https://github.com/stackrox/stackrox/pull/6432/changes
  • Remove theme selection from CodeViewer component, and instead use global page theme
  • Tweak colors for legacy search component
  • Add "@patternfly/patternfly": "^6.4.0" as a dependency to import chart css
  • Import most svgs with ?react suffix to import as a Component instead of a URI to an SVG file. This allows us to style SVGs with CSS in a maintainable way.
  • Add class="text" to dark, textual pieces of these SVG files so that they can respond to dark theming (see images below). This class will change the fill color to white when a dark theme is applied.
  • Add text class to textual elements in integration logos in order to avoid black text on dark backgrounds

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

Manual verification of styles.
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

@dvail
Copy link
Contributor Author

dvail commented Mar 11, 2026

This change is part of the following stack:

Change managed by git-spice.

@openshift-ci
Copy link

openshift-ci bot commented Mar 11, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@dvail dvail force-pushed the dv/pf-6-dark-theme branch from dfc9132 to 92430aa Compare March 11, 2026 19:39
@rhacs-bot
Copy link
Contributor

rhacs-bot commented Mar 11, 2026

Images are ready for the commit at 5f84c5d.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-335-g5f84c5d284.

@dvail dvail force-pushed the dv/pf-6-dark-theme branch from 92430aa to 874b803 Compare March 11, 2026 19:56
@dvail dvail force-pushed the dv/pf-6-dark-theme branch from 874b803 to 2e7d0e4 Compare March 11, 2026 19:59
@dvail dvail marked this pull request as ready for review March 11, 2026 20:00
@dvail dvail requested review from a team as code owners March 11, 2026 20:00
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.65%. Comparing base (2baf700) to head (5f84c5d).
⚠️ Report is 2 commits behind head on dv/ROX-28622-pf-6.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           dv/ROX-28622-pf-6   #19385      +/-   ##
=====================================================
- Coverage              49.65%   49.65%   -0.01%     
=====================================================
  Files                   2698     2698              
  Lines                 203066   203066              
=====================================================
- Hits                  100824   100823       -1     
- Misses                 94722    94724       +2     
+ Partials                7520     7519       -1     
Flag Coverage Δ
go-unit-tests 49.65% <ø> (-0.01%) ⬇️

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

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@sachaudh sachaudh left a comment

Choose a reason for hiding this comment

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

LGTM. A couple of minor suggestions and questions.

@dvail dvail merged commit 199853e into dv/ROX-28622-pf-6 Mar 13, 2026
63 checks passed
@dvail dvail deleted the dv/pf-6-dark-theme branch March 13, 2026 18:11
dvail added a commit that referenced this pull request Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants