Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
bc26df7
Add compact UI styles for search reports and expenses tables
Krishna2323 Mar 24, 2026
300463e
Refine compact table rows with proper last-item border radius, 52px m…
Krishna2323 Mar 24, 2026
3cc6456
Fix last row rounded corners on search expenses, reports, and tasks p…
Krishna2323 Mar 24, 2026
cf7d5e6
Update search skeleton to match compact table layout with proper row …
Krishna2323 Mar 24, 2026
099536c
fix shouldShowLoadingMoreItems condition.
Krishna2323 Mar 24, 2026
5343876
Replace hardcoded border-radius values with variables.componentBorder…
Krishna2323 Mar 24, 2026
362e537
Address PR review feedback: 56px row height, avatar sizing, column wi…
Krishna2323 Mar 25, 2026
927f7dc
Extract reusable border radius styles, fix skeleton loader, and resto…
Krishna2323 Mar 25, 2026
ca596d2
Merge branch 'main' into krishna/86202-compact-table-styles
Krishna2323 Mar 25, 2026
b2276c5
Merge branch 'main' into krishna/86202-compact-table-styles
Krishna2323 Mar 25, 2026
e0b8571
fix skeleton view.
Krishna2323 Mar 25, 2026
609c9be
fix border radius issue.
Krishna2323 Mar 25, 2026
6604fc1
Hide expanded group table header during initial loading state
Krishna2323 Mar 25, 2026
6b5c331
Scope table header styles to wide screens to preserve narrow layout
Krishna2323 Mar 25, 2026
a4ce760
fix prettier.
Krishna2323 Mar 25, 2026
8027dc8
Refactor search table row styles into reusable utilities and fix mobi…
Krishna2323 Mar 25, 2026
be3a2e5
fix prettier.
Krishna2323 Mar 25, 2026
c9cd7fc
Merge branch 'Expensify:main' into krishna/86202-compact-table-styles
Krishna2323 Mar 27, 2026
51d85ab
add border bottom to skeleton rows.
Krishna2323 Mar 27, 2026
3a8560c
fix scrollbar misalignment issue.
Krishna2323 Mar 27, 2026
ad91276
fix: remove flex expansion from amount columns on Reports > Reports page
Krishna2323 Mar 27, 2026
8cb9447
fix: scale bank icon container to match icon size when maxIconSize is…
Krishna2323 Mar 27, 2026
d45a97f
Merge remote-tracking branch 'upstream/main' into krishna/86202-compa…
Krishna2323 Mar 27, 2026
b57c429
Merge branch 'main' into krishna/86202-compact-table-styles
Krishna2323 Mar 27, 2026
84cf379
fix: reduce group header row height to 56px and increase expanded chi…
Krishna2323 Mar 27, 2026
d06c1c5
fix total cell width.
Krishna2323 Mar 27, 2026
ab22661
fix date column mismatch.
Krishna2323 Mar 27, 2026
296a9bc
Merge branch 'Expensify:main' into krishna/86202-compact-table-styles
Krishna2323 Mar 30, 2026
1bbb418
fix prettier.
Krishna2323 Mar 30, 2026
8314d86
Merge branch 'Expensify:main' into krishna/86202-compact-table-styles
Krishna2323 Mar 30, 2026
93b51b7
Use dynamic width for Withdrawn column based on year visibility
Krishna2323 Mar 30, 2026
789c2eb
Merge branch 'Expensify:main' into krishna/86202-compact-table-styles
Krishna2323 Apr 1, 2026
33aa994
Fix total column alignment in expanded group rows and arrow spacing i…
Krishna2323 Apr 1, 2026
5108160
Refactor: extract getSearchTableRowPressableStyle to consolidate row …
Krishna2323 Apr 1, 2026
3ed5f6a
Merge branch 'main' into krishna/86202-compact-table-styles
Krishna2323 Apr 2, 2026
21faa79
Remove 2px margin from search table checkboxes and reduce header min-…
Krishna2323 Apr 2, 2026
3970d0c
Merge branch 'Expensify:main' into krishna/86202-compact-table-styles
Krishna2323 Apr 2, 2026
0757b57
add border bottom to group list item header.
Krishna2323 Apr 2, 2026
a894313
fix: use XOR for shouldRemoveTotalColumnFlex to align expanded group …
Krishna2323 Apr 2, 2026
0c40f49
Refactor table row styles for reusability
Krishna2323 Apr 2, 2026
3b6f63e
fix: remove isReportItemChild from column style calls to fix expanded…
Krishna2323 Apr 2, 2026
87baf59
perf: pass layout props to ReceiptCell and SearchReportAvatar instead…
Krishna2323 Apr 2, 2026
a1805d8
fix: remove 4px gap between name and email in member group header
Krishna2323 Apr 3, 2026
9c95798
minor update.
Krishna2323 Apr 3, 2026
a70c514
update checkbox size.
Krishna2323 Apr 3, 2026
68a4eb7
Merge branch 'main' into krishna/86202-compact-table-styles
Krishna2323 Apr 6, 2026
b807b82
Revert compact UI changes in TableListItem to avoid affecting non-sea…
Krishna2323 Apr 6, 2026
d8da4f6
fix tests.
Krishna2323 Apr 6, 2026
e134190
Optimize Search component performance by consolidating hooks and memo…
Krishna2323 Apr 6, 2026
010dc60
Remove per-row useResponsiveLayout calls and pass isLargeScreenWidth …
Krishna2323 Apr 6, 2026
5380437
Revert "Optimize Search component performance by consolidating hooks …
Krishna2323 Apr 6, 2026
2816520
Reapply "Optimize Search component performance by consolidating hooks…
Krishna2323 Apr 6, 2026
f64eb11
Merge branch 'Expensify:main' into krishna/86202-compact-table-styles
Krishna2323 Apr 6, 2026
8d09da0
Merge branch 'Expensify:main' into krishna/86202-compact-table-styles
Krishna2323 Apr 8, 2026
d917788
Fix intermittent border disappearance on group list items by using bo…
Krishna2323 Apr 8, 2026
dc1fa5c
Fix missing border radius on TransactionListItem cards on medium scre…
Krishna2323 Apr 8, 2026
3f57550
Merge branch 'main' from upstream into krishna/86202-compact-table-st…
Krishna2323 Apr 9, 2026
8740afe
Fix expanded group header column alignment and restore skeleton comments
Krishna2323 Apr 9, 2026
5770615
Fix early exit in shouldShowYear skipping shouldShowYearWithdrawn flag
Krishna2323 Apr 9, 2026
56ea840
Fix shouldShowYear edge cases for withdrawn flag and task date columns
Krishna2323 Apr 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/components/Icon/BankIcons/index.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {BankIcon} from '@src/types/onyx/Bank';
/**
* Returns Bank Icon Object that matches to existing bank icons or default icons
*/
export default function getBankIcon({styles, bankName, isCard = false}: BankIconParams): BankIcon {
export default function getBankIcon({styles, bankName, isCard = false, maxIconSize}: BankIconParams): BankIcon {
const bankIcon: BankIcon = {
icon: isCard ? GenericBankCard : GenericBank,
};
Expand All @@ -23,11 +23,13 @@ export default function getBankIcon({styles, bankName, isCard = false}: BankIcon

// For default Credit Card icon the icon size should not be set.
if (!isCard) {
bankIcon.iconSize = variables.iconSizeExtraLarge;
bankIcon.iconStyles = [styles.bankIconContainer];
const defaultSize = variables.iconSizeExtraLarge;
bankIcon.iconSize = maxIconSize ? Math.min(defaultSize, maxIconSize) : defaultSize;
bankIcon.iconStyles = maxIconSize && maxIconSize < defaultSize ? [{...styles.bankIconContainer, width: bankIcon.iconSize, height: bankIcon.iconSize}] : [styles.bankIconContainer];
} else {
bankIcon.iconHeight = variables.cardIconHeight;
bankIcon.iconWidth = variables.cardIconWidth;
const scale = maxIconSize ? Math.min(1, maxIconSize / variables.cardIconWidth) : 1;
bankIcon.iconHeight = Math.round(variables.cardIconHeight * scale);
bankIcon.iconWidth = Math.round(variables.cardIconWidth * scale);
bankIcon.iconStyles = [styles.cardIcon];
}

Expand Down
14 changes: 9 additions & 5 deletions src/components/Icon/BankIcons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type BankIconAsset = {
/**
* Returns Bank Icon Object that matches to existing bank icons or default icons
*/
export default function getBankIcon({styles, bankName, isCard = false}: BankIconParams): BankIcon {
export default function getBankIcon({styles, bankName, isCard = false, maxIconSize}: BankIconParams): BankIcon {
const bankIcon: BankIcon = {
icon: isCard ? GenericBankCard : GenericBank,
};
Expand All @@ -31,11 +31,15 @@ export default function getBankIcon({styles, bankName, isCard = false}: BankIcon

// For default Credit Card icon the icon size should not be set.
if (!isCard) {
bankIcon.iconSize = variables.iconSizeExtraLarge;
bankIcon.iconStyles = [styles.bankIconContainer];
const defaultSize: number = variables.iconSizeExtraLarge;
bankIcon.iconSize = maxIconSize ? Math.min(defaultSize, maxIconSize) : defaultSize;
bankIcon.iconStyles = maxIconSize && maxIconSize < defaultSize ? [{...styles.bankIconContainer, width: bankIcon.iconSize, height: bankIcon.iconSize}] : [styles.bankIconContainer];
} else {
bankIcon.iconHeight = variables.cardIconHeight;
bankIcon.iconWidth = variables.cardIconWidth;
const cardWidth: number = variables.cardIconWidth;
const cardHeight: number = variables.cardIconHeight;
const scale = maxIconSize ? Math.min(1, maxIconSize / cardWidth) : 1;
bankIcon.iconHeight = Math.round(cardHeight * scale);
bankIcon.iconWidth = Math.round(cardWidth * scale);
bankIcon.iconStyles = [styles.cardIcon];
}

Expand Down
1 change: 1 addition & 0 deletions src/components/Icon/BankIconsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type BankIconParams = {
styles: ThemeStyles;
bankName?: BankName;
isCard?: boolean;
maxIconSize?: number;
};

/**
Expand Down
11 changes: 7 additions & 4 deletions src/components/ReportActionAvatars/SearchReportAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ type SearchReportAvatarProps = {
shouldShowTooltip: boolean;
subscriptAvatarBorderColor: ColorValue;
reportID: string;
isLargeScreenWidth?: boolean;
};

function SearchReportAvatar({primaryAvatar, secondaryAvatar, avatarType, shouldShowTooltip, subscriptAvatarBorderColor, reportID}: SearchReportAvatarProps) {
function SearchReportAvatar({primaryAvatar, secondaryAvatar, avatarType, shouldShowTooltip, subscriptAvatarBorderColor, reportID, isLargeScreenWidth}: SearchReportAvatarProps) {
const avatarSize = isLargeScreenWidth ? CONST.AVATAR_SIZE.SMALL : CONST.AVATAR_SIZE.DEFAULT;

if (!primaryAvatar) {
return null;
}
Expand All @@ -24,7 +27,7 @@ function SearchReportAvatar({primaryAvatar, secondaryAvatar, avatarType, shouldS
<ReportActionAvatar.Subscript
primaryAvatar={primaryAvatar}
secondaryAvatar={secondaryAvatar}
size={CONST.AVATAR_SIZE.DEFAULT}
size={avatarSize}
shouldShowTooltip={shouldShowTooltip}
noRightMarginOnContainer={false}
subscriptAvatarBorderColor={subscriptAvatarBorderColor}
Expand All @@ -37,7 +40,7 @@ function SearchReportAvatar({primaryAvatar, secondaryAvatar, avatarType, shouldS
return (
<ReportActionAvatar.Multiple.Diagonal
icons={[primaryAvatar, secondaryAvatar]}
size={CONST.AVATAR_SIZE.DEFAULT}
size={avatarSize}
shouldShowTooltip={shouldShowTooltip}
isInReportAction={false}
useMidSubscriptSize={false}
Expand All @@ -49,7 +52,7 @@ function SearchReportAvatar({primaryAvatar, secondaryAvatar, avatarType, shouldS
return (
<ReportActionAvatar.Single
avatar={primaryAvatar}
size={CONST.AVATAR_SIZE.DEFAULT}
size={avatarSize}
shouldShowTooltip={shouldShowTooltip}
accountID={Number(primaryAvatar?.id ?? CONST.DEFAULT_NUMBER_ID)}
fallbackIcon={primaryAvatar?.fallbackIcon}
Expand Down
2 changes: 2 additions & 0 deletions src/components/ReportSearchHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {View} from 'react-native';
import AvatarWithDisplayName from '@components/AvatarWithDisplayName';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
import CONST from '@src/CONST';
import type ReportSearchHeaderProps from './types';

function ReportSearchHeader({report, style, transactions, avatarBorderColor}: ReportSearchHeaderProps) {
Expand All @@ -23,6 +24,7 @@ function ReportSearchHeader({report, style, transactions, avatarBorderColor}: Re
shouldEnableDetailPageNavigation={false}
shouldEnableAvatarNavigation={false}
avatarBorderColor={avatarBorderColor}
size={isLargeScreenWidth ? CONST.AVATAR_SIZE.SMALL : CONST.AVATAR_SIZE.DEFAULT}
customDisplayNameStyle={styles.fontWeightNormal}
parentNavigationSubtitleTextStyles={[styles.textLineHeightNormal, styles.minHeight4, styles.mt1, !isLargeScreenWidth && styles.textMicro]}
parentNavigationStatusContainerStyles={statusContainerStyle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import {isMobileChrome} from '@libs/Browser';
import {addKeyDownPressListener, removeKeyDownPressListener} from '@libs/KeyboardShortcut/KeyDownPressListener';
import CONST from '@src/CONST';
import type {SearchListItem} from '../ListItem/types';

Check warning on line 12 in src/components/Search/SearchList/BaseSearchList/index.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Unexpected parent import '../ListItem/types'. Use '@components/Search/SearchList/ListItem/types' instead

Check warning on line 12 in src/components/Search/SearchList/BaseSearchList/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Unexpected parent import '../ListItem/types'. Use '@components/Search/SearchList/ListItem/types' instead
import type BaseSearchListProps from './types';

const AnimatedFlashListComponent = Animated.createAnimatedComponent(FlashList<SearchListItem>);
Expand Down Expand Up @@ -116,7 +116,7 @@
renderItem={renderItemWithKeyboardFocus}
keyExtractor={keyExtractor}
onScroll={onScroll}
showsVerticalScrollIndicator
showsVerticalScrollIndicator={false}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added in #79998. Setting to false will re-introduce #78849

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawnborton Hiding the scrollbar to fix this issue will reintroduce #78849. This also happens on staging, should we tackle it in a separate issue, or do you have another idea?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, fair. I think the only way to solve this is going to be to keep the header of the table fixed/absolute positioned within the same view as the scroll view. Happy to do this separate, cc @JS00001 @luacmartins for a second opinion too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Krishna2323 can we use the scrollbar-gutter css property to fix this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried integrating scrollbar-gutter: stable but it didn't work correctly with FlashList's scroll component. I think this would be better addressed in a separate PR so we can iterate on it without blocking this one.

ref={ref}
extraData={extraData}
onEndReached={onEndReached}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ import React from 'react';
import {View} from 'react-native';
import Avatar from '@components/Avatar';
import Text from '@components/Text';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
import CONST from '@src/CONST';
import type {Icon} from '@src/types/onyx/OnyxCommon';

type AvatarWithTextCellProps = {
reportName?: string;
icon?: Icon;
isLargeScreenWidth?: boolean;
};

function AvatarWithTextCell({reportName, icon}: AvatarWithTextCellProps) {
function AvatarWithTextCell({reportName, icon, isLargeScreenWidth}: AvatarWithTextCellProps) {
const styles = useThemeStyles();
const {isLargeScreenWidth} = useResponsiveLayout();

if (!reportName || !icon) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function BaseListItemHeader<TItem extends ListItem>({

return (
<View>
<View style={[styles.pv1Half, styles.pl3, styles.flexRow, styles.alignItemsCenter, isLargeScreenWidth ? styles.gap3 : styles.justifyContentStart]}>
<View style={[styles.pl3, styles.flexRow, styles.alignItemsCenter, isLargeScreenWidth ? [styles.pv1, styles.gap3] : [styles.pv1Half, styles.justifyContentStart]]}>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.mnh40, styles.flex1, styles.gap3]}>
{!!canSelectMultiple && (
<Checkbox
Expand All @@ -149,7 +149,7 @@ function BaseListItemHeader<TItem extends ListItem>({
isIndeterminate={isIndeterminate}
disabled={!!isDisabled || item.isDisabledCheckbox}
accessibilityLabel={translate('common.select')}
style={isLargeScreenWidth && styles.mr1}
containerStyle={styles.m0}
sentryLabel={CONST.SENTRY_LABEL.SEARCH.GROUP_SELECT_ALL_CHECKBOX}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ function CardListItem<TItem extends ListItem>({
onPress={handleCheckboxPress}
disabled={!!isDisabled}
style={styles.ml3}
containerStyle={styles.m0}
/>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function CardListItemHeader<TItem extends ListItem>({

return (
<View>
<View style={[styles.pv1Half, styles.pl3, styles.flexRow, styles.alignItemsCenter, isLargeScreenWidth ? styles.gap3 : styles.justifyContentStart]}>
<View style={[styles.pl3, styles.flexRow, styles.alignItemsCenter, isLargeScreenWidth ? [styles.pv1, styles.gap3] : [styles.pv1Half, styles.justifyContentStart]]}>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.mnh40, styles.flex1, styles.gap3]}>
{!!canSelectMultiple && (
<Checkbox
Expand All @@ -131,7 +131,7 @@ function CardListItemHeader<TItem extends ListItem>({
isIndeterminate={isIndeterminate}
disabled={!!isDisabled || cardItem.isDisabledCheckbox}
accessibilityLabel={translate('common.select')}
style={isLargeScreenWidth && styles.mr1}
containerStyle={styles.m0}
/>
)}
{!isLargeScreenWidth && (
Expand Down Expand Up @@ -165,6 +165,7 @@ function CardListItemHeader<TItem extends ListItem>({
subscriptAvatarBorderColor={backgroundColor}
noRightMarginOnSubscriptContainer
accountIDs={[cardItem.accountID]}
size={CONST.AVATAR_SIZE.SMALL}
/>
</View>
</UserDetailsTooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import {handleActionButtonPress} from '@libs/actions/Search';
Expand Down Expand Up @@ -46,9 +47,11 @@ function ExpenseReportListItem<TItem extends ListItem>({
onCheckboxPress,
lastPaymentMethod,
personalPolicyID,
isLastItem,
}: ExpenseReportListItemProps<TItem>) {
const reportItem = item as unknown as ExpenseReportListItemType;
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const theme = useTheme();
const {translate} = useLocalize();
const {isLargeScreenWidth} = useResponsiveLayout();
Expand Down Expand Up @@ -170,8 +173,9 @@ function ExpenseReportListItem<TItem extends ListItem>({
item.isSelected && styles.activeComponentBG,
styles.mh0,
isPendingDelete && styles.cursorDisabled,
isLargeScreenWidth && StyleUtils.getSearchTableRowPressableStyle(!!isLastItem, item.isSelected, {vertical: variables.tableRowPaddingVertical}),
],
[styles, item.isSelected, isPendingDelete],
[styles, item.isSelected, isLargeScreenWidth, isLastItem, isPendingDelete, StyleUtils],
);

const listItemWrapperStyle = useMemo(
Expand All @@ -184,7 +188,7 @@ function ExpenseReportListItem<TItem extends ListItem>({
);

const animatedHighlightStyle = useAnimatedHighlightStyle({
borderRadius: variables.componentBorderRadius,
borderRadius: StyleUtils.getSearchTableHighlightBorderRadius(isLargeScreenWidth),
shouldHighlight: item?.shouldAnimateInHighlight ?? false,
highlightColor: theme.messageHighlightBG,
backgroundColor: theme.highlightBG,
Expand Down Expand Up @@ -249,7 +253,7 @@ function ExpenseReportListItem<TItem extends ListItem>({
item={item}
pressableStyle={listItemPressableStyle}
wrapperStyle={listItemWrapperStyle}
containerStyle={[styles.mb2]}
containerStyle={!isLargeScreenWidth && [styles.mb2]}
isFocused={isFocused}
showTooltip={showTooltip}
canSelectMultiple={canSelectMultiple}
Expand All @@ -260,7 +264,7 @@ function ExpenseReportListItem<TItem extends ListItem>({
onLongPressRow={onLongPressRow}
shouldSyncFocus={shouldSyncFocus}
hoverStyle={item.isSelected && styles.activeComponentBG}
pressableWrapperStyle={[styles.mh5, animatedHighlightStyle, isPendingDelete && styles.cursorDisabled]}
pressableWrapperStyle={[styles.mh5, animatedHighlightStyle, isPendingDelete && styles.cursorDisabled, isLargeScreenWidth && isLastItem && styles.searchTableBottomRadius]}
accessible={false}
shouldShowRightCaret={false}
shouldUseDefaultRightHandSideCheckmark={false}
Expand All @@ -284,6 +288,7 @@ function ExpenseReportListItem<TItem extends ListItem>({
isHovered={hovered}
isFocused={isFocused}
isPendingDelete={isPendingDelete}
isLargeScreenWidth={isLargeScreenWidth}
/>
{getDescription}
</View>
Expand Down
Loading
Loading