From dd1cae6f70d5e1182ee36bd67bb5bbf35dc3423c Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Sat, 28 Mar 2026 16:05:45 +0100 Subject: [PATCH] feat(ui): replace text badges with droplet/footprint icons matching context menu --- .../components/ProcessDiagram/ConfigBadge.tsx | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/ui/src/components/ProcessDiagram/ConfigBadge.tsx b/ui/src/components/ProcessDiagram/ConfigBadge.tsx index ccbdff60..f5704ef4 100644 --- a/ui/src/components/ProcessDiagram/ConfigBadge.tsx +++ b/ui/src/components/ProcessDiagram/ConfigBadge.tsx @@ -1,8 +1,6 @@ import type { NodeConfig } from './types'; -const BADGE_HEIGHT = 14; -const BADGE_RADIUS = 7; -const BADGE_FONT_SIZE = 8; +const BADGE_SIZE = 18; const BADGE_GAP = 4; interface ConfigBadgeProps { @@ -11,35 +9,38 @@ interface ConfigBadgeProps { } export function ConfigBadge({ nodeWidth, config }: ConfigBadgeProps) { - const badges: { label: string; color: string }[] = []; - if (config.tapExpression) badges.push({ label: 'TAP', color: '#7C3AED' }); - if (config.traceEnabled) badges.push({ label: 'TRACE', color: '#1A7F8E' }); + const badges: { icon: 'tap' | 'trace'; color: string }[] = []; + if (config.tapExpression) badges.push({ icon: 'tap', color: '#7C3AED' }); + if (config.traceEnabled) badges.push({ icon: 'trace', color: '#1A7F8E' }); if (badges.length === 0) return null; let xOffset = nodeWidth; return ( {badges.map((badge, i) => { - const textWidth = badge.label.length * 5.5 + 8; - xOffset -= textWidth + (i > 0 ? BADGE_GAP : 0); + xOffset -= BADGE_SIZE + (i > 0 ? BADGE_GAP : 0); return ( - - + - - {badge.label} - + {badge.icon === 'tap' ? ( + /* Droplets icon (simplified) */ + + + + ) : ( + /* Footprints icon (simplified) */ + + + + + + + )} ); })}