Skip to content

Commit 599e43e

Browse files
committed
feat: make StoppedIcon theme-aware and remove hardcoded loader colors
1. StoppedIcon component: - Add theme detection using useTheme hook - Use lighter grey (black-300) for dark theme - Use darker grey (black-500) for light theme - Improves visibility of stopped workspace status icon in both themes 2. Main page loader: - Remove hardcoded color: #fff - Remove hardcoded background-color: #000 - Allow loader to inherit theme colors naturally Changes: - Convert StoppedIcon to use dynamic fill color based on theme - Keep greyCssVariable export for backward compatibility - Clean up branding.css to respect theme colors Assisted-by: Claude Sonnet 4.5 Signed-off-by: Oleksii Orel <oorel@redhat.com>
1 parent 9aba0b5 commit 599e43e

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.image-tag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pr-1452-07
1+
pr-1452-08

packages/dashboard-frontend/assets/branding/branding.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
left: 0;
88
z-index: 80;
99
margin: auto;
10-
color: #fff;
1110
font-size: 24px;
1211
font-family: Helvetica, Arial, sans-serif;
13-
background-color: #000;
1412
}
1513

1614
.main-page-loader .ide-page-loader-content img {

packages/dashboard-frontend/src/components/Workspace/Status/StoppedIcon.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,22 @@
1212

1313
import React from 'react';
1414

15-
export const greyCssVariable = 'var(--pf-global--palette--black-500)';
15+
import { useTheme } from '@/contexts/ThemeContext';
16+
17+
// Theme-aware grey colors
18+
const lightGreyCssVariable = 'var(--pf-global--palette--black-500)';
19+
const darkGreyCssVariable = 'var(--pf-global--palette--black-300)';
20+
21+
// Deprecated: kept for backward compatibility
22+
export const greyCssVariable = lightGreyCssVariable;
1623

1724
export function StoppedIcon(): React.ReactElement {
25+
const { isDarkTheme } = useTheme();
26+
const fillColor = isDarkTheme ? darkGreyCssVariable : lightGreyCssVariable;
27+
1828
return (
1929
<svg
20-
fill={greyCssVariable}
30+
fill={fillColor}
2131
height="1em"
2232
width="1em"
2333
viewBox="0 0 16 16"

0 commit comments

Comments
 (0)