Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: light status icon default text color #7828

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

deboer-tim
Copy link
Collaborator

What does this PR do?

The status icon is currently picking up the default text (fill) color from the parent. This is fine at the moment while the default is white, but once we set the default text color in light mode to black (see PR #7729) the fill color would change to black.

This provides a new status color to use for the icons so that (as per design) they use their own color and do not pick up the default/parent text color.

I wasn't 100% sure it should be a '--pd-status' color since this isn't a status color per se like running or stopped, but it's much more obvious that it is related to the other status colors.

Screenshot / video of UI

No visual change.

What issues does this PR fix or reference?

Related to #7729. Fixes #7728.

How to test this PR?

Automated tests, check status icon in a few different states.

  • Tests are covering the bug fix or the new feature

The status icon is currently picking up the default text (fill) color from the
parent. This is fine at the moment while the default is white, but once we set
the default text color in light mode to black (see PR containers#7729) the fill color
would change to black.

This provides a new status color to use for the icons so that (as per design)
they use their own color and do not pick up the default/parent text color.

I wasn't 100% sure it should be a '--pd-status' color since this isn't a
status color per se like running or stopped, but it's much more obvious that
it is related to the other status colors.

Related to containers#7729. Fixes containers#7728.

Signed-off-by: Tim deBoer <[email protected]>
@deboer-tim deboer-tim requested review from benoitf and a team as code owners June 25, 2024 20:42
@deboer-tim deboer-tim requested review from dgolovin and jeffmaury and removed request for a team June 25, 2024 20:42
Comment on lines +1185 to +1191

// contrast color for the other status colors,
// e.g. to use in status icons
this.registerColor(`${status}contrast`, {
dark: colorPalette.white,
light: colorPalette.white,
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure why to define a color if it's always white ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because it was still a design choice. If someone else was making a theme they might be ok with less contrast (maybe an off white), something else might work better with their status colors, or could go transparent.

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.

Light mode for status icon
2 participants