diff --git a/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/NamespaceWithTables/index.tsx b/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/NamespaceWithTables/index.tsx index 4bd0c28af1d..73fca98453d 100644 --- a/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/NamespaceWithTables/index.tsx +++ b/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/NamespaceWithTables/index.tsx @@ -97,6 +97,10 @@ const SchemaFlowDiagram = ({ ) const [lineStart, setLineStart] = useState<{ x: number; y: number } | null>(null) + const [verticalLinePosition, setVerticalLinePosition] = useState<{ + x: number + y: number + } | null>(null) useEffect(() => { const updatePath = () => { @@ -104,11 +108,17 @@ const SchemaFlowDiagram = ({ const containerRect = containerRef.current.getBoundingClientRect() const sourceRect = sourceRef.current.getBoundingClientRect() + const targetRect = targetRef.current.getBoundingClientRect() + // Horizontal line position (desktop) const sourceX = sourceRect.right - containerRect.left const sourceY = sourceRect.top + sourceRect.height / 2 - containerRect.top - setLineStart({ x: sourceX, y: sourceY }) + + // Vertical line position (mobile) + const sourceCenterX = sourceRect.left + sourceRect.width / 2 - containerRect.left + const sourceBottomY = sourceRect.bottom - containerRect.top + setVerticalLinePosition({ x: sourceCenterX, y: sourceBottomY }) } // Small delay to ensure layout is ready @@ -130,7 +140,7 @@ const SchemaFlowDiagram = ({ // Outer container
@@ -165,7 +175,50 @@ const SchemaFlowDiagram = ({ ariaLabel={`Source: ${sourceLabel} ${sourceType} schema`} /> - {/* SVG Path for Straight Dashed Line */} + {/* SVG Path for Vertical Dashed Line (Mobile) */} + {verticalLinePosition && ( + + )} + + {/* SVG Path for Horizontal Dashed Line (Desktop) */} {lineStart && (