From 7a176e10bc780c74725c9171f487b99d25b3154a Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Wed, 1 Jul 2026 09:15:50 -0700 Subject: [PATCH] share component column wrapping. link/pixel card mode. website table formatting. Closes #4372 --- .../boards/[boardId]/BoardSharesTable.tsx | 22 +++++++++++------ src/app/(main)/links/LinksTable.tsx | 2 ++ src/app/(main)/pixels/PixelsTable.tsx | 2 +- src/app/(main)/websites/WebsitesDataTable.tsx | 10 ++++---- src/app/(main)/websites/WebsitesTable.tsx | 16 ++++++++++--- .../[websiteId]/settings/SharesTable.tsx | 24 ++++++++++++------- src/components/share/SimpleSharesTable.tsx | 22 +++++++++++------ 7 files changed, 68 insertions(+), 30 deletions(-) diff --git a/src/app/(main)/boards/[boardId]/BoardSharesTable.tsx b/src/app/(main)/boards/[boardId]/BoardSharesTable.tsx index 2fb307a20..e8e5ff78f 100644 --- a/src/app/(main)/boards/[boardId]/BoardSharesTable.tsx +++ b/src/app/(main)/boards/[boardId]/BoardSharesTable.tsx @@ -1,8 +1,9 @@ -import { DataColumn, DataTable, type DataTableProps, Row } from '@umami/react-zen'; +import { DataColumn, DataTable, Icon, type DataTableProps, Row, Text } from '@umami/react-zen'; import { ShareDeleteButton } from '@/app/(main)/websites/[websiteId]/settings/ShareDeleteButton'; import { CopyButton } from '@/components/common/CopyButton'; -import { ExternalLink } from '@/components/common/ExternalLink'; +import Link from '@/components/common/Link'; import { useConfig, useMessages, useMobile } from '@/components/hooks'; +import { ExternalLink } from '@/components/icons'; import { SimpleShareEditButton } from '@/components/share/SimpleShareEditButton'; export function BoardSharesTable(props: DataTableProps) { @@ -23,15 +24,22 @@ export function BoardSharesTable(props: DataTableProps) { {({ name }: any) => name} - + {({ slug }: any) => { const url = getUrl(slug); return ( - - - {isMobile ? slug : url} - + + + + + {isMobile ? slug : url} + + + + + + ); diff --git a/src/app/(main)/links/LinksTable.tsx b/src/app/(main)/links/LinksTable.tsx index 885e737e3..9b87d0138 100644 --- a/src/app/(main)/links/LinksTable.tsx +++ b/src/app/(main)/links/LinksTable.tsx @@ -27,6 +27,7 @@ export function LinksTable({ showActions, ...props }: LinksTableProps) { id="slug" label={} width="25%" + style={{ minWidth: 0 }} > {({ slug }: any) => { const url = getSlugUrl(slug); @@ -37,6 +38,7 @@ export function LinksTable({ showActions, ...props }: LinksTableProps) { id="url" label={} width="30%" + style={{ minWidth: 0 }} > {({ url }: any) => { return {url}; diff --git a/src/app/(main)/pixels/PixelsTable.tsx b/src/app/(main)/pixels/PixelsTable.tsx index e949603da..325c08438 100644 --- a/src/app/(main)/pixels/PixelsTable.tsx +++ b/src/app/(main)/pixels/PixelsTable.tsx @@ -23,7 +23,7 @@ export function PixelsTable({ showActions, ...props }: PixelsTableProps) { return {name}; }} - }> + } style={{ minWidth: 0 }}> {({ slug }: any) => { const url = getSlugUrl(slug); return ( diff --git a/src/app/(main)/websites/WebsitesDataTable.tsx b/src/app/(main)/websites/WebsitesDataTable.tsx index 28da0e41c..e29106fc4 100644 --- a/src/app/(main)/websites/WebsitesDataTable.tsx +++ b/src/app/(main)/websites/WebsitesDataTable.tsx @@ -1,4 +1,4 @@ -import { Icon, Row } from '@umami/react-zen'; +import { Icon, Row, Text } from '@umami/react-zen'; import { DataGrid } from '@/components/common/DataGrid'; import Link from '@/components/common/Link'; import { useLoginQuery, useNavigation, useUserWebsitesQuery } from '@/components/hooks'; @@ -23,11 +23,13 @@ export function WebsitesDataTable({ const { renderUrl } = useNavigation(); const renderLink = (row: any) => ( - - + + - {row.name} + + {row.name} + ); diff --git a/src/app/(main)/websites/WebsitesTable.tsx b/src/app/(main)/websites/WebsitesTable.tsx index 5034db68c..700b9d87b 100644 --- a/src/app/(main)/websites/WebsitesTable.tsx +++ b/src/app/(main)/websites/WebsitesTable.tsx @@ -1,4 +1,4 @@ -import { DataColumn, DataTable, type DataTableProps, Icon } from '@umami/react-zen'; +import { DataColumn, DataTable, type DataTableProps, Icon, Text } from '@umami/react-zen'; import type { ReactNode } from 'react'; import { DateDistance } from '@/components/common/DateDistance'; import { LinkButton } from '@/components/common/LinkButton'; @@ -22,7 +22,17 @@ export function WebsitesTable({ showActions, renderLink, ...props }: WebsitesTab }> {renderLink} - } /> + } + style={{ minWidth: 0 }} + > + {(row: any) => ( + + {row.domain} + + )} + } {showActions && ( - + {(row: any) => { const websiteId = row.id; diff --git a/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx b/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx index f15661b2f..32760325b 100644 --- a/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx +++ b/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx @@ -1,8 +1,8 @@ -import { DataColumn, DataTable, type DataTableProps, Row } from '@umami/react-zen'; import { CopyButton } from '@/components/common/CopyButton'; -import { DateDistance } from '@/components/common/DateDistance'; -import { ExternalLink } from '@/components/common/ExternalLink'; +import Link from '@/components/common/Link'; import { useConfig, useMessages, useMobile } from '@/components/hooks'; +import { ExternalLink } from '@/components/icons'; +import { DataColumn, DataTable, type DataTableProps, Icon, Row, Text } from '@umami/react-zen'; import { ShareDeleteButton } from './ShareDeleteButton'; import { ShareEditButton } from './ShareEditButton'; @@ -23,14 +23,22 @@ export function SharesTable(props: DataTableProps) { {({ name }: any) => name} - + {({ slug }: any) => { const url = getUrl(slug); + return ( - - - {isMobile ? slug : url} - + + + + + {isMobile ? slug : url} + + + + + + ); diff --git a/src/components/share/SimpleSharesTable.tsx b/src/components/share/SimpleSharesTable.tsx index 7af3e946d..b79c16513 100644 --- a/src/components/share/SimpleSharesTable.tsx +++ b/src/components/share/SimpleSharesTable.tsx @@ -1,8 +1,9 @@ -import { DataColumn, DataTable, type DataTableProps, Row } from '@umami/react-zen'; +import { DataColumn, DataTable, Icon, type DataTableProps, Row, Text } from '@umami/react-zen'; import { ShareDeleteButton } from '@/app/(main)/websites/[websiteId]/settings/ShareDeleteButton'; import { CopyButton } from '@/components/common/CopyButton'; -import { ExternalLink } from '@/components/common/ExternalLink'; +import Link from '@/components/common/Link'; import { useConfig, useMessages, useMobile } from '@/components/hooks'; +import { ExternalLink } from '@/components/icons'; import { SimpleShareEditButton } from './SimpleShareEditButton'; export function SimpleSharesTable(props: DataTableProps) { @@ -24,15 +25,22 @@ export function SimpleSharesTable(props: DataTableProps) { {({ name }: any) => name} - + {({ slug }: any) => { const url = getUrl(slug); return ( - - - {isMobile ? slug : url} - + + + + + {isMobile ? slug : url} + + + + + + );