Skip to content

fix(topology): Fix VM node icon styling in dark mode#6977

Merged
debsmita1 merged 2 commits intobackstage:mainfrom
its-mitesh-kumar:fix/vm-node-dark-mode-styling
Jan 22, 2026
Merged

fix(topology): Fix VM node icon styling in dark mode#6977
debsmita1 merged 2 commits intobackstage:mainfrom
its-mitesh-kumar:fix/vm-node-dark-mode-styling

Conversation

@its-mitesh-kumar
Copy link
Contributor

@its-mitesh-kumar its-mitesh-kumar commented Jan 20, 2026

Problem

The virtual machine node icons in the topology plugin were using a static white background color (var(--pf-t--color--white)) that didn't adapt to dark theme.

Changes

  • Updated VMNode.tsx to use theme-compatible background color instead of static white

UI before changes

Screenshot 2025-12-16 at 12 19 22 PM

UI after changes

Dark Theme

Screenshot 2026-01-21 at 4 15 04 AM (2) ### Light Theme Screenshot 2026-01-21 at 4 14 51 AM (2)

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
@backstage-goalie
Copy link
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-topology workspaces/topology/plugins/topology patch v2.10.0

const useStyles = makeStyles({
kubevirtbg: {
fill: 'var(--pf-t--color--white)',
fill: 'var(--pf-t--global--background--color--primary--default)',
Copy link
Member

@logonoff logonoff Jan 20, 2026

Choose a reason for hiding this comment

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

Use as the color for icons that are placed on an inverse background color

Suggested change
fill: 'var(--pf-t--global--background--color--primary--default)',
fill: 'var(--pf-t--global--icon--color--inverse)',

Copy link
Contributor Author

@its-mitesh-kumar its-mitesh-kumar Jan 22, 2026

Choose a reason for hiding this comment

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

@logonoff I'd prefer to keep var(--pf-t--global--background--color--primary--default) since this is being used for a background fill on the <rect> element, not an icon color.
--pf-t--global--icon--color--inverse is semantically designed for icon colors, not background fills. Using an icon color token for a background rectangle could confuse future maintainers.
Cc: @debsmita1

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I misread the style. Background color makes sense then

Copy link
Contributor

@HusneShabbir HusneShabbir left a comment

Choose a reason for hiding this comment

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

/lgtm

Screen.Recording.2026-01-21.at.5.57.13.PM.mov

const useStyles = makeStyles({
kubevirtbg: {
fill: 'var(--pf-t--color--white)',
fill: 'var(--pf-t--global--background--color--primary--default)',
Copy link
Member

Choose a reason for hiding this comment

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

Ah, I misread the style. Background color makes sense then

@debsmita1 debsmita1 merged commit 82886b5 into backstage:main Jan 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants