From cb7abcb503827fcedc4694159a2bd64183e780ea Mon Sep 17 00:00:00 2001 From: Jack Senyitko Date: Thu, 7 May 2026 09:48:40 -0400 Subject: [PATCH 01/43] add a table row component --- src/components/Table/TableRow.tsx | 5 +++++ src/components/Table/index.tsx | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 src/components/Table/TableRow.tsx diff --git a/src/components/Table/TableRow.tsx b/src/components/Table/TableRow.tsx new file mode 100644 index 000000000000..666d125fdd19 --- /dev/null +++ b/src/components/Table/TableRow.tsx @@ -0,0 +1,5 @@ +type TableRowProps = {}; + +export default function TableRow({}: TableRowProps) { + return <>; +} diff --git a/src/components/Table/index.tsx b/src/components/Table/index.tsx index 91549f2c2cf7..177d177284ce 100644 --- a/src/components/Table/index.tsx +++ b/src/components/Table/index.tsx @@ -39,6 +39,7 @@ import TableBody from './TableBody'; import TableContext from './TableContext'; import TableFilterButtons from './TableFilterButtons'; import TableHeader from './TableHeader'; +import TableRow from './TableRow'; import TableSearchBar from './TableSearchBar'; /** @@ -66,6 +67,9 @@ const Table = Object.assign(TableComponent, { /** Renders a search input. */ SearchBar: TableSearchBar, + + /** Renders a row in the table */ + Row: TableRow, }); export default Table; From 2c7819d7a7901f2386118b0894d238f448097109 Mon Sep 17 00:00:00 2001 From: Jack Senyitko Date: Thu, 7 May 2026 09:56:24 -0400 Subject: [PATCH 02/43] update table header --- .../MoneyRequestReportTransactionItem.tsx | 2 +- .../MoneyRequestReportTransactionList.tsx | 4 ++-- .../ListItem/ExpenseReportListItem.tsx | 10 +++++----- .../Search/SearchList/ListItem/TaskListItem.tsx | 2 +- .../ListItem/TransactionGroupListItem.tsx | 6 +++--- .../SearchList/ListItem/TransactionListItem.tsx | 16 ++++++++-------- src/components/Search/SearchStaticList.tsx | 13 +++---------- src/components/Skeletons/SearchRowSkeleton.tsx | 4 ++-- src/components/Table/TableHeader.tsx | 6 ++++-- .../MergeTransactionsListContent.tsx | 4 ++-- src/styles/index.ts | 4 ++-- src/styles/utils/index.ts | 6 +++--- 12 files changed, 36 insertions(+), 41 deletions(-) diff --git a/src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx b/src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx index 04c00b51e9b6..418baa4f696c 100644 --- a/src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx +++ b/src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx @@ -133,7 +133,7 @@ function MoneyRequestReportTransactionItem({ return ( renderTransactionItem(transaction)); - const narrowListWrapper = shouldUseNarrowLayout ? [styles.highlightBG, styles.searchTableTopRadius, styles.searchTableBottomRadius, styles.overflowHidden] : undefined; + const narrowListWrapper = shouldUseNarrowLayout ? [styles.highlightBG, styles.tableTopRadius, styles.tableBottomRadius, styles.overflowHidden] : undefined; const transactionListContent = ( 0), ]} > diff --git a/src/components/Search/SearchList/ListItem/ExpenseReportListItem.tsx b/src/components/Search/SearchList/ListItem/ExpenseReportListItem.tsx index 2b16aaf92690..6a2f74688537 100644 --- a/src/components/Search/SearchList/ListItem/ExpenseReportListItem.tsx +++ b/src/components/Search/SearchList/ListItem/ExpenseReportListItem.tsx @@ -186,8 +186,8 @@ function ExpenseReportListItem({ styles.mh0, isPendingDelete && styles.cursorDisabled, isLargeScreenWidth ? StyleUtils.getSearchTableRowPressableStyle(!!isLastItem, item.isSelected, {vertical: variables.tableRowPaddingVertical}) : styles.noBorderRadius, - !isLargeScreenWidth && isFirstItem && [styles.searchTableTopRadius, styles.overflowHidden], - !isLargeScreenWidth && isLastItem && [styles.searchTableBottomRadius, styles.overflowHidden], + !isLargeScreenWidth && isFirstItem && [styles.tableTopRadius, styles.overflowHidden], + !isLargeScreenWidth && isLastItem && [styles.tableBottomRadius, styles.overflowHidden], ], [styles, item.isSelected, isLargeScreenWidth, isFirstItem, isLastItem, isPendingDelete, StyleUtils], ); @@ -286,9 +286,9 @@ function ExpenseReportListItem({ styles.mh5, animatedHighlightStyle, isPendingDelete && styles.cursorDisabled, - isLargeScreenWidth && isLastItem && [styles.searchTableBottomRadius, styles.overflowHidden], - !isLargeScreenWidth && isFirstItem && styles.searchTableTopRadius, - !isLargeScreenWidth && isLastItem && styles.searchTableBottomRadius, + isLargeScreenWidth && isLastItem && [styles.tableBottomRadius, styles.overflowHidden], + !isLargeScreenWidth && isFirstItem && styles.tableTopRadius, + !isLargeScreenWidth && isLastItem && styles.tableBottomRadius, !isLargeScreenWidth && !isLastItem && StyleUtils.getSelectedBorderBottomStyle(item.isSelected), ]} accessible={false} diff --git a/src/components/Search/SearchList/ListItem/TaskListItem.tsx b/src/components/Search/SearchList/ListItem/TaskListItem.tsx index ff2350e96079..a9e1757683f7 100644 --- a/src/components/Search/SearchList/ListItem/TaskListItem.tsx +++ b/src/components/Search/SearchList/ListItem/TaskListItem.tsx @@ -81,7 +81,7 @@ function TaskListItem({ onLongPressRow={onLongPressRow} shouldSyncFocus={shouldSyncFocus} hoverStyle={item.isSelected && styles.activeComponentBG} - pressableWrapperStyle={[styles.mh5, animatedHighlightStyle, isLargeScreenWidth && isLastItem && [styles.searchTableBottomRadius, styles.overflowHidden]]} + pressableWrapperStyle={[styles.mh5, animatedHighlightStyle, isLargeScreenWidth && isLastItem && [styles.tableBottomRadius, styles.overflowHidden]]} forwardedFSClass={fsClass} > ({ ...styles.searchTableRowHeight, borderRadius: 0, paddingVertical: variables.tableGroupRowPaddingVertical, - ...(isLastItem ? styles.searchTableBottomRadius : {}), + ...(isLastItem ? styles.tableBottomRadius : {}), }, isItemSelected && styles.activeComponentBG, ]; @@ -543,8 +543,8 @@ function TransactionGroupListItem({ isLargeScreenWidth ? [StyleUtils.getSearchTableGroupRowBorderStyle(isFirstItem, isLastItem, isItemSelected), isLastItem && styles.overflowHidden] : [ - isFirstItem && [styles.searchTableTopRadius, styles.overflowHidden], - isLastItem && [styles.searchTableBottomRadius, styles.overflowHidden], + isFirstItem && [styles.tableTopRadius, styles.overflowHidden], + isLastItem && [styles.tableBottomRadius, styles.overflowHidden], !isLastItem && StyleUtils.getSelectedBorderBottomStyle(isItemSelected), ], ]} diff --git a/src/components/Search/SearchList/ListItem/TransactionListItem.tsx b/src/components/Search/SearchList/ListItem/TransactionListItem.tsx index 08bf8329fe52..31b06adc8899 100644 --- a/src/components/Search/SearchList/ListItem/TransactionListItem.tsx +++ b/src/components/Search/SearchList/ListItem/TransactionListItem.tsx @@ -121,9 +121,9 @@ function TransactionListItem({ ...StyleUtils.getSearchTableRowPressableStyle(!!isLastItem, item.isSelected), } : {...styles.flexColumn, ...styles.alignItemsStretch}, - isLargeScreenWidth && isLastItem && [styles.searchTableBottomRadius, styles.overflowHidden], - !isLargeScreenWidth && isFirstItem && [styles.searchTableTopRadius, styles.overflowHidden], - !isLargeScreenWidth && isLastItem && [styles.searchTableBottomRadius, styles.overflowHidden], + isLargeScreenWidth && isLastItem && [styles.tableBottomRadius, styles.overflowHidden], + !isLargeScreenWidth && isFirstItem && [styles.tableTopRadius, styles.overflowHidden], + !isLargeScreenWidth && isLastItem && [styles.tableBottomRadius, styles.overflowHidden], ]; const animatedHighlightStyle = useAnimatedHighlightStyle({ @@ -223,9 +223,9 @@ function TransactionListItem({ styles.flex1, animatedHighlightStyle, styles.userSelectNone, - isLargeScreenWidth && isLastItem && styles.searchTableBottomRadius, - !isLargeScreenWidth && isFirstItem && styles.searchTableTopRadius, - !isLargeScreenWidth && isLastItem && styles.searchTableBottomRadius, + isLargeScreenWidth && isLastItem && styles.tableBottomRadius, + !isLargeScreenWidth && isFirstItem && styles.tableTopRadius, + !isLargeScreenWidth && isLastItem && styles.tableBottomRadius, !isLargeScreenWidth && !isLastItem && StyleUtils.getSelectedBorderBottomStyle(item.isSelected), ]} > @@ -266,8 +266,8 @@ function TransactionListItem({ style={[ styles.p3, styles.pv2, - !isLargeScreenWidth && [styles.p0, styles.pt3, isLastItem ? styles.searchTableBottomRadius : styles.noBorderRadius], - isLargeScreenWidth && (isLastItem ? styles.searchTableBottomRadius : styles.noBorderRadius), + !isLargeScreenWidth && [styles.p0, styles.pt3, isLastItem ? styles.tableBottomRadius : styles.noBorderRadius], + isLargeScreenWidth && (isLastItem ? styles.tableBottomRadius : styles.noBorderRadius), ]} violations={transactionViolations} onArrowRightPress={isDeletedTransaction ? undefined : () => onSelectRow(item, transactionPreviewData)} diff --git a/src/components/Search/SearchStaticList.tsx b/src/components/Search/SearchStaticList.tsx index 31f55779d711..cb82c76c880f 100644 --- a/src/components/Search/SearchStaticList.tsx +++ b/src/components/Search/SearchStaticList.tsx @@ -180,8 +180,8 @@ function SearchStaticList({ styles.flex1, styles.userSelectNone, {backgroundColor: theme.highlightBG}, - isFirstItem && styles.searchTableTopRadius, - isLastItem && [styles.searchTableBottomRadius, styles.overflowHidden], + isFirstItem && styles.tableTopRadius, + isLastItem && [styles.tableBottomRadius, styles.overflowHidden], !isLastItem && styles.borderBottom, ]} > @@ -239,14 +239,7 @@ function SearchStaticList({ return ( ( <> ({style, shouldHideHea return ( ); diff --git a/src/styles/index.ts b/src/styles/index.ts index 9f54c2ed1efb..86d8640e7f88 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -2523,12 +2523,12 @@ const staticStyles = (theme: ThemeColors) => borderBottomRightRadius: variables.componentBorderRadiusNormal, }, - searchTableTopRadius: { + tableTopRadius: { borderTopLeftRadius: variables.componentBorderRadius, borderTopRightRadius: variables.componentBorderRadius, }, - searchTableBottomRadius: { + tableBottomRadius: { borderBottomLeftRadius: variables.componentBorderRadius, borderBottomRightRadius: variables.componentBorderRadius, }, diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index 8556779da9a5..7babc7aad9e0 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -1822,14 +1822,14 @@ const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({ borderRadius: 0, borderBottomWidth: isLastItem ? 0 : 1, borderColor: isSelected ? theme.buttonHoveredBG : theme.border, - ...(isLastItem ? styles.searchTableBottomRadius : {}), + ...(isLastItem ? styles.tableBottomRadius : {}), }), getSearchTableGroupRowBorderStyle: (isFirstItem?: boolean, isLastItem?: boolean, isSelected?: boolean): ViewStyle => ({ borderRadius: 0, borderTopWidth: isFirstItem ? 0 : 1, borderColor: isSelected ? theme.buttonHoveredBG : theme.border, - ...(isLastItem ? styles.searchTableBottomRadius : {}), + ...(isLastItem ? styles.tableBottomRadius : {}), }), getSearchTableRowPressableStyle: (isLastItem?: boolean, isSelected?: boolean, padding?: {vertical?: number; horizontal?: number}): ViewStyle => ({ @@ -1840,7 +1840,7 @@ const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({ borderBottomRightRadius: 0, borderBottomWidth: isLastItem ? 0 : 1, borderColor: isSelected ? theme.buttonHoveredBG : theme.border, - ...(isLastItem ? styles.searchTableBottomRadius : {}), + ...(isLastItem ? styles.tableBottomRadius : {}), ...(padding?.vertical !== undefined && {paddingVertical: padding.vertical}), ...(padding?.horizontal !== undefined && {paddingHorizontal: padding.horizontal}), }), From 3c84767aa1da698886ae2eddde09af7ce99597ca Mon Sep 17 00:00:00 2001 From: Jack Senyitko Date: Thu, 7 May 2026 10:07:10 -0400 Subject: [PATCH 03/43] update table styles --- .../ListItem/TransactionGroupListExpanded.tsx | 2 +- .../ListItem/TransactionGroupListItem.tsx | 2 +- .../WorkspaceCompanyCardsTableItem.tsx | 21 +++++++++++++++---- .../WorkspaceCompanyCardsTable/index.tsx | 1 + src/styles/index.ts | 2 +- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/components/Search/SearchList/ListItem/TransactionGroupListExpanded.tsx b/src/components/Search/SearchList/ListItem/TransactionGroupListExpanded.tsx index d5bdb408ebe4..1e3d8ee88362 100644 --- a/src/components/Search/SearchList/ListItem/TransactionGroupListExpanded.tsx +++ b/src/components/Search/SearchList/ListItem/TransactionGroupListExpanded.tsx @@ -283,7 +283,7 @@ function TransactionGroupListExpanded({ onCheckboxPress={() => onSelectionButtonPress?.(transaction as unknown as TItem)} columns={currentColumns} onButtonPress={() => handleButtonPress(transaction)} - style={[styles.noBorderRadius, isLargeScreenWidth ? [styles.p3, styles.pv2, styles.searchTableRowHeight] : styles.p4, styles.flex1]} + style={[styles.noBorderRadius, isLargeScreenWidth ? [styles.p3, styles.pv2, styles.tableRowHeight] : styles.p4, styles.flex1]} isReportItemChild isInSingleTransactionReport={isInSingleTransactionReport} shouldShowBottomBorder={shouldShowBottomBorder} diff --git a/src/components/Search/SearchList/ListItem/TransactionGroupListItem.tsx b/src/components/Search/SearchList/ListItem/TransactionGroupListItem.tsx index a5bddfd03f8a..3b351c91e4e0 100644 --- a/src/components/Search/SearchList/ListItem/TransactionGroupListItem.tsx +++ b/src/components/Search/SearchList/ListItem/TransactionGroupListItem.tsx @@ -210,7 +210,7 @@ function TransactionGroupListItem({ const pressableStyle = [ styles.transactionGroupListItemStyle, isLargeScreenWidth && { - ...styles.searchTableRowHeight, + ...styles.tableRowHeight, borderRadius: 0, paddingVertical: variables.tableGroupRowPaddingVertical, ...(isLastItem ? styles.tableBottomRadius : {}), diff --git a/src/pages/workspace/companyCards/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableItem.tsx b/src/pages/workspace/companyCards/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableItem.tsx index da5cbee64bdc..ab9a419cfc19 100644 --- a/src/pages/workspace/companyCards/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableItem.tsx +++ b/src/pages/workspace/companyCards/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableItem.tsx @@ -60,6 +60,9 @@ type WorkspaceCompanyCardTableItemProps = { /** Number of columns in the table */ columnCount: number; + /** Whether or not the item is the last item in the table */ + isLastItem: boolean; + /** * Callback when assigning a card. * @param cardName - The masked card number displayed to users @@ -77,6 +80,7 @@ function WorkspaceCompanyCardTableItem({ columnCount, isAssigningCardDisabled, onAssignCard, + isLastItem, }: WorkspaceCompanyCardTableItemProps) { const styles = useThemeStyles(); const theme = useTheme(); @@ -110,7 +114,7 @@ function WorkspaceCompanyCardTableItem({ shouldHideOnDelete={false} > {isDeleting ? ( - + ) : (