Compare commits

..

4 Commits

Author SHA1 Message Date
github-actions[bot] 5188bc289e ci: update artifact hub metadata for v0.3.4 2026-02-12 03:45:07 +00:00
Chris Farhood 33ef816826 chore: bump version to 0.3.4 2026-02-11 22:44:29 -05:00
Chris Farhood ea28ab3a81 Merge pull request #5 from cpfarhood/fix/dark-mode-theme-support
fix: add dark mode support using MUI CSS variables
2026-02-11 22:44:06 -05:00
Chris Farhood 57f0bf6b4b fix: add dark mode support using MUI CSS variables
Replace all hardcoded colors with Headlamp's MUI CSS variables to ensure
proper theme support in both light and dark modes. This fixes the issue
where plugin UI elements had white backgrounds when the site switched to
dark mode.

Changes:
- PolarisSettings: Use theme variables for input, button, text colors
- ExemptionManager: Use theme variables for all buttons and UI elements
- DashboardView: Use theme variables for refresh button
- AppBarScoreBadge: Keep semantic colors (green/orange/red) for status

CSS Variables Used:
- --mui-palette-primary-main: Primary action color
- --mui-palette-primary-contrastText: Text on primary bg
- --mui-palette-background-paper: Card/paper backgrounds
- --mui-palette-text-primary: Primary text color
- --mui-palette-text-secondary: Secondary text color
- --mui-palette-divider: Border/divider colors
- --mui-palette-action-disabled: Disabled text color
- --mui-palette-action-disabledBackground: Disabled bg color
- --mui-palette-error-main: Error/danger actions

All tests passing (50/50), build successful.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-11 22:43:52 -05:00
5 changed files with 44 additions and 18 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
version: 0.3.3
version: 0.3.4
name: headlamp-polaris-plugin
displayName: Polaris
createdAt: "2026-02-05T19:00:00Z"
@@ -28,7 +28,7 @@ maintainers:
- name: cpfarhood
email: "chris@farhood.org"
annotations:
headlamp/plugin/archive-url: "https://github.com/cpfarhood/headlamp-polaris-plugin/releases/download/v0.3.3/headlamp-polaris-plugin-0.3.3.tar.gz"
headlamp/plugin/archive-url: "https://github.com/cpfarhood/headlamp-polaris-plugin/releases/download/v0.3.4/headlamp-polaris-plugin-0.3.4.tar.gz"
headlamp/plugin/version-compat: ">=0.26"
headlamp/plugin/archive-checksum: sha256:b18a94682d991e4d8b5297ff58c5e56d86f93f0657a9485297c1b62a0504ff57
headlamp/plugin/archive-checksum: sha256:175a7bdedaf6a9329abc9041b505bfa07029e1ae512fc8207301d216e01ce5b1
headlamp/plugin/distro-compat: in-cluster
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "headlamp-polaris-plugin",
"version": "0.3.3",
"version": "0.3.4",
"description": "Headlamp plugin for Fairwinds Polaris audit results",
"scripts": {
"start": "headlamp-plugin start",
+2 -2
View File
@@ -117,8 +117,8 @@ export default function DashboardView() {
style={{
padding: '6px 16px',
backgroundColor: 'transparent',
color: '#1976d2',
border: '1px solid #1976d2',
color: 'var(--mui-palette-primary-main, #1976d2)',
border: '1px solid var(--mui-palette-primary-main, #1976d2)',
borderRadius: '4px',
cursor: 'pointer',
fontSize: '13px',
+22 -8
View File
@@ -149,8 +149,8 @@ export default function ExemptionManager({
<button
style={{
padding: '4px 12px',
backgroundColor: '#f44336',
color: 'white',
backgroundColor: 'var(--mui-palette-error-main, #f44336)',
color: 'var(--mui-palette-error-contrastText, #fff)',
border: 'none',
borderRadius: '4px',
cursor: 'pointer',
@@ -176,10 +176,19 @@ export default function ExemptionManager({
style={{
marginTop: '8px',
padding: '6px 16px',
backgroundColor: failingChecks.length === 0 ? '#ccc' : 'transparent',
color: failingChecks.length === 0 ? '#999' : '#1976d2',
backgroundColor:
failingChecks.length === 0
? 'var(--mui-palette-action-disabledBackground, #e0e0e0)'
: 'transparent',
color:
failingChecks.length === 0
? 'var(--mui-palette-action-disabled, #9e9e9e)'
: 'var(--mui-palette-primary-main, #1976d2)',
border: '1px solid',
borderColor: failingChecks.length === 0 ? '#ccc' : '#1976d2',
borderColor:
failingChecks.length === 0
? 'var(--mui-palette-divider, #e0e0e0)'
: 'var(--mui-palette-primary-main, #1976d2)',
borderRadius: '4px',
cursor: failingChecks.length === 0 ? 'not-allowed' : 'pointer',
fontSize: '13px',
@@ -237,7 +246,7 @@ export default function ExemptionManager({
style={{
padding: '6px 16px',
backgroundColor: 'transparent',
color: '#1976d2',
color: 'var(--mui-palette-primary-main, #1976d2)',
border: 'none',
borderRadius: '4px',
cursor: 'pointer',
@@ -252,8 +261,13 @@ export default function ExemptionManager({
style={{
padding: '6px 16px',
backgroundColor:
applying || (!exemptAll && selectedChecks.size === 0) ? '#ccc' : '#1976d2',
color: 'white',
applying || (!exemptAll && selectedChecks.size === 0)
? 'var(--mui-palette-action-disabledBackground, #e0e0e0)'
: 'var(--mui-palette-primary-main, #1976d2)',
color:
applying || (!exemptAll && selectedChecks.size === 0)
? 'var(--mui-palette-action-disabled, #9e9e9e)'
: 'var(--mui-palette-primary-contrastText, #fff)',
border: 'none',
borderRadius: '4px',
cursor:
+16 -4
View File
@@ -105,12 +105,20 @@ export default function PolarisSettings(props: PluginSettingsProps) {
style={{
width: '100%',
padding: '4px 8px',
border: '1px solid #ccc',
border: '1px solid var(--mui-palette-divider, #e0e0e0)',
borderRadius: '4px',
fontSize: '14px',
backgroundColor: 'var(--mui-palette-background-paper, #fff)',
color: 'var(--mui-palette-text-primary, #000)',
}}
/>
<div style={{ fontSize: '12px', color: '#666', marginTop: '4px' }}>
<div
style={{
fontSize: '12px',
color: 'var(--mui-palette-text-secondary, #666)',
marginTop: '4px',
}}
>
Examples:
<br /> K8s proxy:{' '}
<code>/api/v1/namespaces/polaris/services/polaris-dashboard:80/proxy/</code>
@@ -128,8 +136,12 @@ export default function PolarisSettings(props: PluginSettingsProps) {
disabled={testing}
style={{
padding: '6px 16px',
backgroundColor: testing ? '#ccc' : '#1976d2',
color: 'white',
backgroundColor: testing
? 'var(--mui-palette-action-disabledBackground, #e0e0e0)'
: 'var(--mui-palette-primary-main, #1976d2)',
color: testing
? 'var(--mui-palette-action-disabled, #9e9e9e)'
: 'var(--mui-palette-primary-contrastText, #fff)',
border: 'none',
borderRadius: '4px',
cursor: testing ? 'not-allowed' : 'pointer',