Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ function FlatFindingRow({ finding, onResourceClick, showCluster, onClusterClick
onClusterClick ? (
<button
onClick={() => onClusterClick(finding.cluster!.id)}
className="text-xs text-[var(--color-radar-accent)] hover:underline shrink-0 max-w-[160px] truncate text-left"
className="text-xs text-[var(--color-radar-accent,var(--accent))] hover:underline shrink-0 max-w-[160px] truncate text-left"
>
{finding.cluster.name}
</button>
Expand Down
16 changes: 8 additions & 8 deletions packages/k8s-ui/src/components/checks/ChecksView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export function ChecksView({ checks, catalog, anyData, evaluated, missingInputs
placeholder="Search checks…"
value={search}
onChange={(e) => filters.setString('q', e.target.value)}
className="w-64 rounded-lg border border-theme-border-light bg-theme-base py-1.5 pl-9 pr-8 text-sm text-theme-text-primary placeholder-theme-text-disabled focus:outline-none focus:ring-2 focus:ring-[var(--color-radar-accent)]"
className="w-64 rounded-lg border border-theme-border-light bg-theme-base py-1.5 pl-9 pr-8 text-sm text-theme-text-primary placeholder-theme-text-disabled focus:outline-none focus:ring-2 focus:ring-[var(--color-radar-accent,var(--accent))]"
/>
{search && (
<button
Expand Down Expand Up @@ -340,7 +340,7 @@ export function ChecksView({ checks, catalog, anyData, evaluated, missingInputs
return (
<span
key={id}
className="inline-flex items-center gap-1 rounded-full border border-[var(--color-radar-accent)]/30 bg-[var(--color-radar-accent)]/10 py-1 pl-2.5 pr-1 text-xs text-theme-text-primary"
className="inline-flex items-center gap-1 rounded-full border border-[var(--color-radar-accent,var(--accent))]/30 bg-[var(--color-radar-accent,var(--accent))]/10 py-1 pl-2.5 pr-1 text-xs text-theme-text-primary"
>
<span className="min-w-0 max-w-[12rem] truncate">
<ClusterName name={label} />
Expand Down Expand Up @@ -520,7 +520,7 @@ function CheckReferenceLinks({ references }: { references: CheckReference[] }) {
href={r.url}
target="_blank"
rel="noreferrer"
className="inline-flex items-center gap-1 text-xs font-medium text-[var(--color-radar-accent)] hover:underline"
className="inline-flex items-center gap-1 text-xs font-medium text-[var(--color-radar-accent,var(--accent))] hover:underline"
>
{r.label}
<ExternalLink className="h-3 w-3" />
Expand Down Expand Up @@ -594,7 +594,7 @@ export function CheckCardShell({
onToggle()
}
}}
className={`group flex cursor-pointer items-center gap-3 border-l-[3px] py-3 pl-3 pr-4 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-radar-accent)]/40 ${open ? SEVERITY_HEADER_BAND_CLASS[sev] : SEVERITY_RAIL_CLASS[sev]}`}
className={`group flex cursor-pointer items-center gap-3 border-l-[3px] py-3 pl-3 pr-4 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-radar-accent,var(--accent))]/40 ${open ? SEVERITY_HEADER_BAND_CLASS[sev] : SEVERITY_RAIL_CLASS[sev]}`}
>
<SeverityIcon className={`h-[18px] w-[18px] shrink-0 ${SEVERITY_TEXT_CLASS[sev]}`} aria-hidden />

Expand Down Expand Up @@ -701,7 +701,7 @@ export function CheckClusterBreakdownShell<T extends CheckClusterBreakdownGroup>
<button
type="button"
onClick={() => setShowAllClusters(true)}
className="mt-0.5 inline-flex w-fit items-center gap-1 rounded px-2 py-1 text-xs font-medium text-[var(--color-radar-accent)] hover:underline"
className="mt-0.5 inline-flex w-fit items-center gap-1 rounded px-2 py-1 text-xs font-medium text-[var(--color-radar-accent,var(--accent))] hover:underline"
>
View all {groups.length} clusters →
</button>
Expand Down Expand Up @@ -849,7 +849,7 @@ function ResourceList({
<button
type="button"
onClick={() => setShowAll(true)}
className="mt-0.5 inline-flex w-fit items-center gap-1 rounded px-2 py-1 text-xs font-medium text-[var(--color-radar-accent)] hover:underline"
className="mt-0.5 inline-flex w-fit items-center gap-1 rounded px-2 py-1 text-xs font-medium text-[var(--color-radar-accent,var(--accent))] hover:underline"
>
View all {check.findings.length} →
</button>
Expand All @@ -875,7 +875,7 @@ function FindingLine({
<>
<span className="flex min-w-0 items-baseline gap-2">
<span className="shrink-0 font-mono text-[11px] uppercase tracking-wide text-theme-text-tertiary">{r.kind}</span>
<span className={`min-w-0 break-all font-medium ${linkable ? 'text-[var(--color-radar-accent)]' : 'text-theme-text-primary'}`}>
<span className={`min-w-0 break-all font-medium ${linkable ? 'text-[var(--color-radar-accent,var(--accent))]' : 'text-theme-text-primary'}`}>
{r.namespace ? `${r.namespace} / ` : ''}
{r.name}
</span>
Expand Down Expand Up @@ -1010,7 +1010,7 @@ function ClusterFilter({
onClick={() => onToggle(o.id)}
className="flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm text-theme-text-secondary transition-colors hover:bg-theme-hover hover:text-theme-text-primary"
>
<span className={`flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border ${on ? 'border-[var(--color-radar-accent)] bg-[var(--color-radar-accent)] text-white' : 'border-theme-border'}`}>
<span className={`flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border ${on ? 'border-[var(--color-radar-accent,var(--accent))] bg-[var(--color-radar-accent,var(--accent))] text-white' : 'border-theme-border'}`}>
{on && <span className="text-[9px] leading-none">✓</span>}
</span>
<span className="min-w-0 truncate">
Expand Down
4 changes: 2 additions & 2 deletions packages/k8s-ui/src/components/issues/IssuesView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export function IssueRow({
onToggle();
}
}}
className={`group @container/issue flex cursor-pointer items-center gap-3 border-l-[3px] py-3 pl-3 pr-4 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-radar-accent)]/40 ${open ? ISSUE_SEVERITY_HEADER_BAND_CLASS[severity] : ISSUE_SEVERITY_RAIL_CLASS[severity]}`}
className={`group @container/issue flex cursor-pointer items-center gap-3 border-l-[3px] py-3 pl-3 pr-4 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-radar-accent,var(--accent))]/40 ${open ? ISSUE_SEVERITY_HEADER_BAND_CLASS[severity] : ISSUE_SEVERITY_RAIL_CLASS[severity]}`}
>
<SeverityIcon className={`h-[18px] w-[18px] shrink-0 ${ISSUE_SEVERITY_TEXT_CLASS[severity]}`} aria-hidden />

Expand Down Expand Up @@ -719,7 +719,7 @@ function ResourceLine({
) : (
<span className="shrink-0 font-mono text-[11px] uppercase tracking-wide text-theme-text-tertiary">{r.kind}</span>
)}
<span className={`min-w-0 truncate text-sm ${linkable ? `${compact ? 'font-semibold' : 'font-medium'} text-[var(--color-radar-accent)]` : 'font-medium text-theme-text-primary'}`}>
<span className={`min-w-0 truncate text-sm ${linkable ? `${compact ? 'font-semibold' : 'font-medium'} text-[var(--color-radar-accent,var(--accent))]` : 'font-medium text-theme-text-primary'}`}>
{r.namespace ? `${r.namespace} / ` : ''}
{r.name}
</span>
Expand Down
2 changes: 1 addition & 1 deletion packages/k8s-ui/src/components/ui/FilterPill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const TONE_ACTIVE: Record<FilterPillTone, string> = {
high: 'bg-orange-500/15 border-orange-500/40 text-orange-800 dark:text-orange-300',
medium: 'bg-yellow-500/15 border-yellow-500/40 text-yellow-800 dark:text-yellow-300',
ok: 'bg-emerald-500/15 border-emerald-500/40 text-emerald-700 dark:text-emerald-300',
brand: 'bg-[var(--color-brand-50)] border-[var(--color-radar-accent)] text-theme-text-primary dark:bg-[var(--color-brand-950)]',
brand: 'bg-[var(--color-brand-50,var(--accent-muted))] border-[var(--color-radar-accent,var(--accent))] text-theme-text-primary dark:bg-[var(--color-brand-950,var(--accent-muted))]',
Comment thread
nadaverell marked this conversation as resolved.
}

const INACTIVE = 'border-theme-border-light text-theme-text-secondary hover:border-theme-border hover:text-theme-text-primary hover:bg-theme-hover/50'
Expand Down
18 changes: 12 additions & 6 deletions packages/k8s-ui/src/components/ui/ResourceBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function ResourceBar({
label,
}: ResourceBarProps) {
const track = (
<div className={clsx('relative', layout === 'inline' && 'min-w-0 flex-1')}>
<div className={clsx('relative', layout === 'inline' && 'min-w-16 flex-1')}>
<div className={clsx('rounded-full border border-theme-border bg-theme-elevated overflow-hidden', layout === 'inline' ? 'h-1' : 'h-1.5')}>
<div
className={clsx('h-full rounded-full transition-[width] duration-300 ease-out', getBarColor(percent, colorScheme))}
Expand All @@ -78,15 +78,15 @@ export function ResourceBar({

const bar =
layout === 'inline' ? (
<div className="flex items-center gap-1.5 min-w-0">
<div className={clsx('flex items-center gap-1.5 min-w-0', tooltip && 'w-full')}>
<span className="w-7 shrink-0 text-[10px] font-medium uppercase tracking-wide text-theme-text-tertiary">{label}</span>
{track}
<span className="w-8 shrink-0 text-right text-[10.5px] font-mono tabular-nums text-theme-text-secondary">
{Math.round(percent)}%
</span>
</div>
) : (
<div className="flex flex-col gap-0.5 min-w-0">
<div className={clsx('flex flex-col gap-0.5 min-w-0', tooltip && 'w-full')}>
<div className="flex items-baseline justify-between gap-1">
<span className="text-xs font-mono text-theme-text-secondary truncate">
{used} / {total}
Expand All @@ -99,11 +99,17 @@ export function ResourceBar({
</div>
)

// Tooltip's wrapper is inline-flex: it sizes the row to its content (hence
// w-full on the row, or the track collapses to the labels' width) and it is
// inline-level, so the block div keeps sibling bars stacked instead of
// sharing one line.
if (tooltip) {
return (
<Tooltip content={tooltip} delay={200} position="top" wrapperClassName="w-full min-w-0">
{bar}
</Tooltip>
<div className="min-w-0">
<Tooltip content={tooltip} delay={200} position="top" wrapperClassName="w-full min-w-0">
{bar}
</Tooltip>
</div>
)
}

Expand Down
2 changes: 1 addition & 1 deletion web/src/components/home/HomeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ function ProblemsPanel({
<div className="flex items-center gap-2">
<button
type="button"
className="rounded-md px-2 py-1 text-xs font-medium text-accent-text transition-colors hover:bg-accent-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-radar-accent)]/40"
className="rounded-md px-2 py-1 text-xs font-medium text-accent-text transition-colors hover:bg-accent-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-radar-accent,var(--accent))]/40"
onClick={onNavigateToIssues}
>
View all
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/ui/Omnibar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ export const Omnibar = forwardRef<OmnibarHandle, OmnibarProps>(function Omnibar(
>
<SearchPillInput
className={hero
? `min-h-14 px-5 rounded-2xl bg-theme-surface border border-theme-border shadow-theme-sm transition-[color,background-color,border-color,box-shadow] duration-[140ms] ${TW_EASE_UI} focus-within:border-[var(--color-brand-500)] focus-within:shadow-[0_0_0_4px_color-mix(in_srgb,var(--color-brand-500)_15%,transparent)]`
? `min-h-14 px-5 rounded-2xl bg-theme-surface border border-theme-border shadow-theme-sm transition-[color,background-color,border-color,box-shadow] duration-[140ms] ${TW_EASE_UI} focus-within:border-[var(--color-brand-500,var(--accent))] focus-within:shadow-[0_0_0_4px_color-mix(in_srgb,var(--color-brand-500,var(--accent))_15%,transparent)]`
Comment thread
nadaverell marked this conversation as resolved.
: `min-h-8 px-2.5 rounded-md bg-theme-elevated border border-transparent focus-within:border-theme-border focus-within:bg-theme-surface transition-[color,background-color,border-color] duration-[140ms] ${TW_EASE_UI}`}
inputClassName={hero ? 'text-lg py-4' : undefined}
text={text}
Expand Down
Loading