Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
improvement(table): add V3 skeleton rows and opt-in cell wrapping (#8567)
Andrew Huang02779efefb63
diff --git a/frontend/src/components/V3_MIGRATION.md b/frontend/src/components/V3_MIGRATION.mdindex 7c88fdcce9..46b2c8ed70 100644--- a/frontend/src/components/V3_MIGRATION.md+++ b/frontend/src/components/V3_MIGRATION.md@@ -74,7 +74,7 @@ In the table, E is the number of external consumer files and I is the number of| `Spinner/Spinner.tsx` | 19 / 1 | V3 Spinner; preserve wait semantics, sizing, and caller disabling. | `frontend/src/pages/auth/SelectOrgPage/SelectOrgPage.tsx:346` || `Stepper/Stepper.tsx` | 0 / 0 | Deleted in first wave; no consumer. | Only its own/root barrels exported it. || `Switch/Switch.tsx` | 20 / 0 | V3 Toggle; preserve checked/value contract, labels, disabled and mutation state. | `frontend/src/components/secret-rotations-v2/DeleteSecretRotationV2Modal.tsx:66` |-| `Table/Table.tsx` | 30 / 0 | V3 Table/DataGrid chosen by workflow; preserve selection, sort, resize, virtualization and pagination state. | `frontend/src/pages/organization/GroupDetailsByIDPage/components/AddGroupProjectModal.tsx:109` |+| `Table/Table.tsx` | 30 / 0 | V3 Table/DataGrid chosen by workflow; preserve selection, sort, resize, virtualization and pagination state. `TableSkeleton` maps to `TableSkeletonRows` (`columns`, optional `rows`; drop `innerKey`). Long-text columns that wrapped in V2 set `isWrappable` on each `TableCell`; otherwise V3 keeps cells on one line. | `frontend/src/pages/organization/GroupDetailsByIDPage/components/AddGroupProjectModal.tsx:109` || `Tabs/Tabs.tsx` | 10 / 0 | V3 Tabs; preserve controlled/default state, URL state, panel lifetime and keyboard navigation. | `frontend/src/pages/kms/SettingsPage/SettingsPage.tsx:33` || `Tag/Tag.tsx` | 3 / 0 | V3 Badge composition; preserve diff/status intent and accessible text. | `frontend/src/components/secrets/diff/FieldDiffRenderers.tsx:128` || `TextArea/TextArea.tsx` | 15 / 0 | V3 TextArea + Field; preserve controlled values, multiline input and validation. | `frontend/src/pages/cert-manager/ApprovalsPage/components/RequestsTab/RequestDetailModal.tsx:396` |diff --git a/frontend/src/components/v3/generic/Table/Table.stories.tsx b/frontend/src/components/v3/generic/Table/Table.stories.tsxindex df30967934..01506e5f8b 100644--- a/frontend/src/components/v3/generic/Table/Table.stories.tsx+++ b/frontend/src/components/v3/generic/Table/Table.stories.tsx@@ -32,6 +32,7 @@ import {TableHead,TableHeader,TableRow,+ TableSkeletonRows,type TableSortDirection,TableVirtualBody} from "./Table";@@ -94,6 +95,14 @@ const identities: Identity[] = [* with a height-constrained container (`containerClassName="max-h-40"`).* - **`isTruncatable`** on `TableHead` / `TableCell` clips long content with* ellipsis instead of letting the column blow out the row width.+ * - **`isWrappable`** on `TableCell` wraps long text (descriptions, paths,+ * error messages) onto more lines within a bounded column width+ * (`max-w-md`, overridable through `className`). Set it on every cell of+ * the column.+ *+ * While rows load, render `TableSkeletonRows` inside `TableBody` with the+ * table's column count (and an optional `rows` count, default 3) instead of+ * hand-rolling skeleton cells.* - **`data-state="selected"`** on a `TableRow` paints the selected highlight* for row-checkbox patterns.* - **`onSortChange`** on `TableHead` renders an accessible, full-cell sort button.@@ -545,6 +554,83 @@ export const TruncatedCells: Story = {)};+export const WrappedCells: Story = {+ name: "Example: Wrapped Cells",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `isWrappable` to every `TableCell` of a column whose full text must stay readable, such as descriptions, paths, or error messages. The text wraps within a bounded width (`max-w-md`, overridable through `className`) and long unbroken values break where they need to. Other columns keep the default single-line layout."+ }+ }+ },+ render: () => (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead>Scan</TableHead>+ <TableHead>Status</TableHead>+ <TableHead>Error</TableHead>+ <TableHead>Started</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {[+ {+ id: "scan-1",+ status: "Failed",+ error:+ "Could not clone repository: the GitHub App installation lacks read access to the contents of this repository.",+ started: "Oct 12, 2026 09:14"+ },+ {+ id: "scan-2",+ status: "Failed",+ error:+ "File too large to scan: /services/payments/fixtures/generated/large-transaction-export-2026-10-01.json",+ started: "Oct 11, 2026 22:40"+ },+ { id: "scan-3", status: "Completed", error: "None", started: "Oct 11, 2026 08:02" }+ ].map((scan) => (+ <TableRow key={scan.id}>+ <TableCell className="font-medium">{scan.id}</TableCell>+ <TableCell>{scan.status}</TableCell>+ <TableCell isWrappable>{scan.error}</TableCell>+ <TableCell>{scan.started}</TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ )+};++export const LoadingRows: Story = {+ name: "Example: Loading Rows",+ parameters: {+ docs: {+ description: {+ story:+ "While the first page of data loads, render `TableSkeletonRows` inside `TableBody` with the number of columns in the header. `rows` defaults to 3."+ }+ }+ },+ render: () => (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead>Name</TableHead>+ <TableHead>Role</TableHead>+ <TableHead>Managed By</TableHead>+ <TableHead variant="action" />+ </TableRow>+ </TableHeader>+ <TableBody>+ <TableSkeletonRows columns={4} />+ </TableBody>+ </Table>+ )+};+export const WithActions: Story = {name: "Example: With Actions",parameters: {diff --git a/frontend/src/components/v3/generic/Table/Table.tsx b/frontend/src/components/v3/generic/Table/Table.tsxindex 559fd10d11..b5fb3da124 100644--- a/frontend/src/components/v3/generic/Table/Table.tsx+++ b/frontend/src/components/v3/generic/Table/Table.tsx@@ -3,6 +3,8 @@ import { useVirtualizer } from "@tanstack/react-virtual";import { cn } from "@app/components/v3/utils";+import { Skeleton } from "../Skeleton";+const Table = React.forwardRef<HTMLDivElement,React.ComponentProps<"table"> & { containerClassName?: string; hasAttachedFooter?: boolean }@@ -243,10 +245,12 @@ function TableHeadLabel({function TableCell({className,isTruncatable,+ isWrappable,variant = "default",...props}: React.ComponentProps<"td"> & {isTruncatable?: boolean;+ isWrappable?: boolean;variant?: TableColumnVariant;}) {return (@@ -256,6 +260,7 @@ function TableCell({className={cn("h-10 border-b border-border px-3 py-1.5 align-middle whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>svg]:size-4",isTruncatable && "max-w-0 truncate",+ isWrappable && "max-w-md wrap-anywhere whitespace-normal",variant === "action" && "min-w-12 pr-1.5 text-end",className)}@@ -264,6 +269,22 @@ function TableCell({);}+function TableSkeletonRows({ columns, rows = 3 }: { columns: number; rows?: number }) {+ return (+ <>+ {Array.from({ length: rows }, (_, row) => (+ <TableRow key={row} data-slot="table-skeleton-row">+ {Array.from({ length: columns }, (__, column) => (+ <TableCell key={column}>+ <Skeleton className="h-4 w-full" />+ </TableCell>+ ))}+ </TableRow>+ ))}+ </>+ );+}+function TableCaption({ className, ...props }: React.ComponentProps<"caption">) {return (<caption@@ -289,6 +310,7 @@ export {TableHeader,TableHeadLabel,TableRow,+ TableSkeletonRows,type TableSortDirection,TableVirtualBody,type TableVirtualRowProps