From 183ab562835ec00dddf916c079e4efc78658317b Mon Sep 17 00:00:00 2001 From: mohiit1502 Date: Sun, 23 Aug 2026 17:42:31 +0530 Subject: [PATCH] fix: remove expand/collapse from MyEntityStrip, always show all items The collapse behavior made strips appear empty on some pages (Plugins). All MY strips now always show every item without truncation or toggle. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- src/components/MyEntityStrip.tsx | 37 +++----------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/src/components/MyEntityStrip.tsx b/src/components/MyEntityStrip.tsx index edcf53b..c02164c 100644 --- a/src/components/MyEntityStrip.tsx +++ b/src/components/MyEntityStrip.tsx @@ -1,6 +1,6 @@ -import { useState, useRef, useEffect, type ReactNode } from 'react' +import { type ReactNode } from 'react' import { Link } from 'react-router-dom' -import { ChevronRight, ChevronDown, ChevronUp, Clock } from 'lucide-react' +import { ChevronRight, Clock } from 'lucide-react' import { formatRelativeTime } from '@/lib/utils' import { MyPanel, type MyPanelTheme } from './MyPanel' @@ -42,25 +42,9 @@ const STATUS_COLORS: Record = { archived: 'var(--ag-text-ghost)', } -// One collapsed row = 68px card + 10px gap buffer -const ROW_H = 78 - export function MyEntityStrip({ title, icon, items, emptyText, theme = 'agos', badge, headerAction, }: MyEntityStripProps) { - const [expanded, setExpanded] = useState(false) - const gridRef = useRef(null) - const [fullH, setFullH] = useState(null) - - useEffect(() => { - const el = gridRef.current - if (!el) return - const ro = new ResizeObserver(() => setFullH(el.scrollHeight)) - ro.observe(el) - setFullH(el.scrollHeight) - return () => ro.disconnect() - }, [items.length]) - if (items.length === 0 && !emptyText) return null return ( @@ -83,15 +67,7 @@ export function MyEntityStrip({
{emptyText ?? 'Nothing here yet'}
) : ( <> -
+
{items.map((item, idx) => { const dotColor = item.statusColor ?? (item.status ? STATUS_COLORS[item.status] ?? undefined : undefined) @@ -158,13 +134,6 @@ export function MyEntityStrip({ ) })}
- {fullH !== null && fullH > ROW_H && ( - - )} )}