From dd6e8ee9689b33a5daeac4919b80c609743de468 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 25 May 2026 13:02:38 +0200 Subject: [PATCH] feat(docs-ui): shared FileIcon + signed-state pill on EntityFolderView rows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Extract FileIcon mapping to `src/components/files/file-icon.tsx` (single source of truth for mime→icon+colour palette; was previously inline in FileGrid only). - EntityFolderView file rows now render the type-specific icon (PDF/red, Image/blue, Sheet/green, Video/purple) instead of a generic FileText — multi-deal clients become scannable at a glance. - Add an inline "Signed" pill on rows where signedFromDocumentId is set so reps can distinguish a signed-from-workflow copy from a vanilla upload without hovering for "View signing details". - Tighter hover treatment (row picks up a subtle bg on hover) for affordance. - FileGrid refactored to consume the shared FileIcon so both surfaces stay in lockstep on future mime additions. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../documents/entity-folder-view.tsx | 13 +++++++-- src/components/files/file-grid.tsx | 27 +++---------------- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/src/components/documents/entity-folder-view.tsx b/src/components/documents/entity-folder-view.tsx index 0f1a02f3..598d23d9 100644 --- a/src/components/documents/entity-folder-view.tsx +++ b/src/components/documents/entity-folder-view.tsx @@ -7,6 +7,7 @@ import { ClipboardSignature, FileText, Eye, Download } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { AggregatedSection } from './aggregated-section'; import { SigningDetailsDialog } from './signing-details-dialog'; +import { FileIcon } from '@/components/files/file-icon'; import { FilePreviewDialog } from '@/components/files/file-preview-dialog'; import { useAggregatedFiles, useAggregatedWorkflows } from '@/hooks/use-aggregated-listing'; import { StatusPill, type StatusPillStatus } from '@/components/ui/status-pill'; @@ -95,15 +96,23 @@ export function EntityFolderView({ portSlug, entityType, entityId }: Props) { renderRow={(f: AggregatedFile, _group: AggregatedGroup) => { const signedFromDocumentId = f.signedFromDocumentId; return ( -
+