From d19b1e292562e0f23577884a09fd2bfb3e88776f Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Thu, 27 Nov 2025 23:14:41 +1000 Subject: [PATCH] fix(ui): replace Tailwind classes with direct SVG attributes in FlowDiagram MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Convert all SVG fill/stroke from Tailwind classes to direct attributes - Use hsl(var(--css-custom-property)) for theme compatibility - Add explicit fontSize, fontFamily, fontWeight instead of text-* classes - Fixes text visibility issue where labels appeared as black rectangles Resolves rendering bug where SVG text elements weren't displaying properly due to improper CSS class application on SVG elements. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- packages/ui/src/FlowDiagram/FlowDiagram.tsx | 121 +++++++++++++++----- 1 file changed, 94 insertions(+), 27 deletions(-) diff --git a/packages/ui/src/FlowDiagram/FlowDiagram.tsx b/packages/ui/src/FlowDiagram/FlowDiagram.tsx index 8f48ed5..19787ba 100644 --- a/packages/ui/src/FlowDiagram/FlowDiagram.tsx +++ b/packages/ui/src/FlowDiagram/FlowDiagram.tsx @@ -48,16 +48,20 @@ export function FlowDiagram({ y="20" width="100" height="60" - className="fill-surface stroke-foreground" + fill="hsl(var(--surface))" + stroke="hsl(var(--foreground))" strokeWidth="2" rx="0" /> AI Agent @@ -67,7 +71,7 @@ export function FlowDiagram({ Semantic Query "email, slack..." @@ -113,7 +123,7 @@ export function FlowDiagram({ TPMJS REGISTRY Dynamic Discovery 2,847 tools @@ -169,7 +187,8 @@ export function FlowDiagram({ cx="200" cy="280" r="5" - className="fill-none stroke-brutalist-accent" + fill="none" + stroke="hsl(var(--brutalist-accent))" strokeWidth="2" opacity="0" style={{ @@ -181,7 +200,7 @@ export function FlowDiagram({ - + Email Tool - + 12K calls @@ -251,22 +286,38 @@ export function FlowDiagram({ y="380" width="100" height="80" - className="fill-surface stroke-foreground" + fill="hsl(var(--surface))" + stroke="hsl(var(--foreground))" strokeWidth="2" rx="0" /> - + Slack Tool - + 8K calls @@ -276,22 +327,38 @@ export function FlowDiagram({ y="380" width="100" height="80" - className="fill-surface stroke-foreground" + fill="hsl(var(--surface))" + stroke="hsl(var(--foreground))" strokeWidth="2" rx="0" /> - + Calendar Tool - + 5K calls