From ade6bf93a7759638538f5e9240e2f932a0e21408 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Thu, 12 Feb 2026 09:28:24 -0500 Subject: [PATCH] fix: use explicit opaque colors for drawer background The previous approach using 'opacity: 1' and CSS variable 'var(--mui-palette-background-paper)' did not work because: - CSS variable can resolve to semi-transparent rgba() values - opacity property does not affect background color alpha channel - Semi-transparent background allowed backdrop to bleed through Solution: - Use explicit opaque hex colors (#ffffff light, #1e1e1e dark) - CSS media query for dark mode: @media (prefers-color-scheme: dark) - Unique class name per namespace to avoid conflicts - Maintains proper text color with CSS variable fallbacks Root cause identified by debugger agent: opacity multiplies element rendering but does NOT fix backgroundColor alpha transparency. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- src/components/NamespacesListView.tsx | 243 ++++++++++++++------------ 1 file changed, 128 insertions(+), 115 deletions(-) diff --git a/src/components/NamespacesListView.tsx b/src/components/NamespacesListView.tsx index 198a569..887fe4a 100644 --- a/src/components/NamespacesListView.tsx +++ b/src/components/NamespacesListView.tsx @@ -95,126 +95,139 @@ function NamespaceDetailPanel({ namespace, onClose }: NamespaceDetailPanelProps) return countsPerResource.get(`${row.Namespace}/${row.Kind}/${row.Name}`) ?? resourceCounts(row); } + // Generate a unique class name for this drawer to avoid conflicts + const drawerClass = `polaris-namespace-drawer-${namespace}`; + return ( -
-
-

- Polaris — {namespace} -

- +

+ Polaris — {namespace} +

+ +
+ + + + View in Polaris Dashboard + + ), + }, + ]} + /> + + + + {score}%, + }, + { name: 'Total Checks', value: String(counts.total) }, + { + name: 'Pass', + value: {counts.pass}, + }, + { + name: 'Warning', + value: {counts.warning}, + }, + { + name: 'Danger', + value: {counts.danger}, + }, + { + name: 'Skipped', + value: ( + + {counts.skipped} + + ), + }, + ]} + /> + + + + row.Name }, + { label: 'Kind', getter: (row: Result) => row.Kind }, + { + label: 'Pass', + getter: (row: Result) => ( + {getResourceCounts(row).pass} + ), + }, + { + label: 'Warning', + getter: (row: Result) => ( + {getResourceCounts(row).warning} + ), + }, + { + label: 'Danger', + getter: (row: Result) => ( + {getResourceCounts(row).danger} + ), + }, + ]} + data={results} + emptyMessage={`No resources found in namespace "${namespace}".`} + /> +
- - - - View in Polaris Dashboard - - ), - }, - ]} - /> - - - - {score}%, - }, - { name: 'Total Checks', value: String(counts.total) }, - { - name: 'Pass', - value: {counts.pass}, - }, - { - name: 'Warning', - value: {counts.warning}, - }, - { - name: 'Danger', - value: {counts.danger}, - }, - { - name: 'Skipped', - value: ( - - {counts.skipped} - - ), - }, - ]} - /> - - - - row.Name }, - { label: 'Kind', getter: (row: Result) => row.Kind }, - { - label: 'Pass', - getter: (row: Result) => ( - {getResourceCounts(row).pass} - ), - }, - { - label: 'Warning', - getter: (row: Result) => ( - {getResourceCounts(row).warning} - ), - }, - { - label: 'Danger', - getter: (row: Result) => ( - {getResourceCounts(row).danger} - ), - }, - ]} - data={results} - emptyMessage={`No resources found in namespace "${namespace}".`} - /> - - + ); }