Skip to content

Clean up report page styles#71448

Merged
JS00001 merged 64 commits into
Expensify:mainfrom
Krishna2323:krishna2323/issue/70369
Oct 30, 2025
Merged

Clean up report page styles#71448
JS00001 merged 64 commits into
Expensify:mainfrom
Krishna2323:krishna2323/issue/70369

Conversation

@Krishna2323

@Krishna2323 Krishna2323 commented Sep 28, 2025

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixed Issues

$ #70369
PROPOSAL: #70369 (comment)

Tests

  1. Go to reports page
  2. Explore all the tabs in the sidebar
  3. Verify list items in each tab matches the mocks in the issue description.
  4. Also verify that buttons and icons in the list item like works correctly (like - view, submit, arrow down)
  • Verify that no errors appear in the JS console

Offline tests

  • Requires internet connection to load reports page data.

QA Steps

  1. Go to reports page
  2. Explore all the tabs in the sidebar
  3. Verify list items in each tab matches the mocks in the issue description.
  4. Also verify that buttons and icons in the list item like works correctly (like - view, submit, arrow down)
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
android_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@codecov

codecov Bot commented Sep 28, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.83333% with 41 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...onListWithSections/Search/MemberListItemHeader.tsx 0.00% 7 Missing ⚠️
...tionListWithSections/Search/CardListItemHeader.tsx 0.00% 6 Missing ⚠️
...WithSections/Search/WithdrawalIDListItemHeader.tsx 0.00% 6 Missing ⚠️
...thSections/Search/TransactionGroupListExpanded.tsx 69.23% 4 Missing ⚠️
src/components/AnimatedCollapsible/index.tsx 57.14% 3 Missing ⚠️
...ts/SelectionListWithSections/Search/ActionCell.tsx 25.00% 3 Missing ⚠️
src/components/TransactionItemRow/index.tsx 90.32% 3 Missing ⚠️
src/styles/utils/index.ts 66.66% 3 Missing ⚠️
...stReportView/MoneyRequestReportTransactionItem.tsx 0.00% 2 Missing ⚠️
src/components/ButtonWithDropdownMenu/index.tsx 50.00% 1 Missing ⚠️
... and 3 more
Files with missing lines Coverage Δ
src/CONST/index.ts 85.71% <ø> (ø)
src/components/AvatarWithDisplayName.tsx 82.35% <100.00%> (+0.53%) ⬆️
src/components/Badge.tsx 100.00% <100.00%> (ø)
src/components/Button/index.tsx 89.92% <100.00%> (+0.22%) ⬆️
src/components/Icon/index.tsx 91.17% <100.00%> (+0.26%) ⬆️
...stReportView/MoneyRequestReportTransactionList.tsx 4.21% <ø> (ø)
src/components/ParentNavigationSubtitle.tsx 66.66% <100.00%> (ø)
src/components/ReportSearchHeader/index.tsx 100.00% <100.00%> (ø)
...onListWithSections/Search/ReportListItemHeader.tsx 91.89% <100.00%> (+0.71%) ⬆️
...nts/SelectionListWithSections/Search/TotalCell.tsx 100.00% <100.00%> (ø)
... and 20 more

... and 83 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@Krishna2323

Copy link
Copy Markdown
Contributor Author

@Expensify/design for initial review 🙇🏻👀

Desktop Medium (1000px) Mobile (400px)
submit_tab_desktop submit_tab_medium submit_tab_mobile
approve_tab_desktop approve_tab_medium approve_tab_mobile
pay_tab_desktop pay_tab_medium pay_tab_mobile
uc_tab_desktop uc_tab_medium uc_tab_mobile
expenses_tab_desktop expenses_tab_medium expenses_tab_mobile
reports_tab_desktop reports_tab_medium reports_tab_mobile
Submit tab submit_tab_desktop submit_tab_medium submit_tab_mobile
Approve tab approve_tab_desktop approve_tab_medium approve_tab_mobile
Pay tab pay_tab_desktop pay_tab_medium pay_tab_mobile
Unapproved cash tab uc_tab_desktop uc_tab_medium uc_tab_mobile
Expenses tab expenses_tab_desktop expenses_tab_medium expenses_tab_mobile
Reports tab

reports_tab_desktop | reports_tab_medium | reports_tab_mobile

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@shawnborton

Copy link
Copy Markdown
Contributor

Did you change the avatar size? We don't need to change anything there, they should stay at 40x40.

It looks like our alignment is off here too, the total column isn't aligned from header to table:
CleanShot 2025-09-29 at 21 49 52@2x

Maybe you can double check the styles quickly with this Figma file, and then we can run a test build after you fix a few of these items?

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@Krishna2323

Copy link
Copy Markdown
Contributor Author

@Expensify/design Thanks for the Figma file; it was really helpful. Please check these screenshots, and if everything looks good, I think we can run test builds.

Monosnap (2) New Expensify 2025-10-02 00-31-19 Monosnap (2) New Expensify 2025-10-02 00-31-50

@shawnborton

Copy link
Copy Markdown
Contributor

Nice, I will run a test build!

@github-actions

github-actions Bot commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

🚧 @shawnborton has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@shawnborton

Copy link
Copy Markdown
Contributor

The arrows are gone from some of the grouping views, like Unreported cash:
CleanShot 2025-10-02 at 10 33 54@2x

@shawnborton

Copy link
Copy Markdown
Contributor

On small screens, the text styles here for the From/To don't match Figma. Your PR:
CleanShot 2025-10-02 at 10 34 45@2x

Figma:
CleanShot 2025-10-02 at 10 35 17@2x

@shawnborton

shawnborton commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

When we show the second line below a report name or a user name, right now we are setting the line to 20px height:
CleanShot 2025-10-02 at 10 48 06@2x

But from Figma, we actually want to keep that line at 16px height (including line height), and add a 4px gap above it:
CleanShot 2025-10-02 at 10 49 00@2x

This comment applies to both mobile and desktop btw.

@shawnborton

Copy link
Copy Markdown
Contributor

We don't want this section here to have a height of 52px:
CleanShot 2025-10-02 at 10 50 11@2x

Rather, it should have a height of 40px and have 8px of margin above it:
CleanShot 2025-10-02 at 10 50 40@2x

@Krishna2323

Krishna2323 commented Oct 30, 2025

Copy link
Copy Markdown
Contributor Author

@getusha I was unable to reproduce the issues, have I missed something?

Monosnap.screencast.2025-10-30.17-12-26.mp4

@getusha

getusha commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

@getusha I was unable to reproduce the issues, have I missed something?

Same, looks like i needed to pull latest commits.

@getusha

getusha commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

Corner not rounded on selected MoneyRequestTransactionItem

  1. Go to reports
  2. Navigate to a report with multiple transactions and select one
Screenshot 2025-10-30 at 2 58 58 in the afternoon

@getusha

getusha commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

Category column title not aligned with the categories

  1. Go to reports
  2. Navigate to a report with multiple transactions
Screenshot 2025-10-30 at 3 05 17 in the afternoon

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@Krishna2323

Copy link
Copy Markdown
Contributor Author

Category column title not aligned with the categories
Corner not rounded on selected MoneyRequestTransactionItem

Fixed both

@getusha

getusha commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

@Krishna2323 the border radius is applied here as well, it looks off

Screenshot 2025-10-30 at 3 36 13 in the afternoon

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@Krishna2323

Copy link
Copy Markdown
Contributor Author

the border radius is applied here as well, it looks off

fixed 🫣

@getusha getusha left a comment

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.

LGTM

@melvin-bot melvin-bot Bot requested a review from JS00001 October 30, 2025 13:51
@JS00001 JS00001 merged commit 2153a41 into Expensify:main Oct 30, 2025
26 checks passed
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/JS00001 in version: 9.2.42-0 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

OSBotify commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/luacmartins in version: 9.2.42-11 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@trjExpensify

trjExpensify commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

👋 @Krishna2323 I think something got lost in the shuffle here. The nested expenses rows in the group-by results on mobile are no longer clickable, making it so people can't click to view the expense details. Example of group-by:withdrawal-id below:

image

We need to fix that. @dubielzyk-expensify put this together on how it should look for a tappable row with the > caret:

image

@Krishna2323 - can you get going on a PR for that now, please? I'll create a parent issue for you to comment and then assign to you. Thanks!

@Krishna2323

Copy link
Copy Markdown
Contributor Author

@trjExpensify I'll start working on the PR within an hour. Please create tha issue and assign me. Thanks!

@trjExpensify

trjExpensify commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

Great - comment on the issue and I'll assign you: #76129

Edit: I can assign you. Done!

@ikevin127

Copy link
Copy Markdown
Contributor

@getusha @Krishna2323 Please make sure in the future that such "solutions" don't pass review / get merged as it caused another regression (caught too late):

Explanation:

The isLargeScreenWidth && styles.pr0 was added as part of this issue to remove the right-side padding in cases like this (Reports -> Reports):

Image

Note: Besides not being mentioned in the proposal (hacks not mentioned in the proposal should not be added on the fly during PR phase) - this was not the best choice from the PR author / reviewer letting it pass, should've kept the padding and instead remove extra spacing from the arrow icon - this way the regression wouldn't have existed.

A better solution here targeting the root cause could've been to keep the original styles.p3 and for the screenshot displayed above (styling issue): remove the extra spacing from the right side of arrow icon instead (current value is 14px-12px = 2px remaining -> would've corrected the issue without having to add this conditional p0 style).**

Example DIFF
diff --git a/src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx b/src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx
index f4a3a38847a..052c66e45f4 100644
--- a/src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx
+++ b/src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx
@@ -86,7 +86,7 @@ function MoneyRequestReportTransactionItem({
     const {translate} = useLocalize();
     const styles = useThemeStyles();
     // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
-    const {isSmallScreenWidth, isMediumScreenWidth, isLargeScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout();
+    const {isSmallScreenWidth, isMediumScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout();
     const theme = useTheme();
     const isPendingDelete = isTransactionPendingDelete(transaction);
     const pendingAction = getTransactionPendingAction(transaction);
@@ -154,7 +154,7 @@ function MoneyRequestReportTransactionItem({
                     columns={columns}
                     areAllOptionalColumnsHidden={areAllOptionalColumnsHidden}
                     isDisabled={isPendingDelete}
-                    style={[styles.p3, isLargeScreenWidth && styles.pr0]}
+                    style={[styles.p3]}
                     onButtonPress={() => {
                         handleOnPress(transaction.transactionID);
                     }}
diff --git a/src/components/TransactionItemRow/index.tsx b/src/components/TransactionItemRow/index.tsx
index 50571bcabfc..dc87752fdb4 100644
--- a/src/components/TransactionItemRow/index.tsx
+++ b/src/components/TransactionItemRow/index.tsx
@@ -556,7 +556,7 @@ function TransactionItemRow({
                     {!!isLargeScreenWidth && !!onArrowRightPress && (
                         <PressableWithFeedback
                             onPress={() => onArrowRightPress?.()}
-                            style={[styles.p3Half, styles.pl0half, styles.justifyContentCenter, styles.alignItemsEnd]}
+                            style={[styles.p3Half, styles.pl0half, styles.pr0half, styles.justifyContentCenter, styles.alignItemsEnd]}
                             accessibilityRole={CONST.ROLE.BUTTON}
                             accessibilityLabel={CONST.ROLE.BUTTON}
                         >
diff --git a/src/styles/utils/spacing.ts b/src/styles/utils/spacing.ts
index e0c5ec07c68..947ccd3c917 100644
--- a/src/styles/utils/spacing.ts
+++ b/src/styles/utils/spacing.ts
@@ -575,6 +575,10 @@ export default {
         paddingRight: 0,
     },
 
+    pr0half: {
+        paddingRight: 2,
+    },
+
     pr1: {
         paddingRight: 4,
     },

@Krishna2323

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, @ikevin127 — noted.

This was a very large PR with many moving parts, so it’s definitely possible that some UI details slipped through. I agree there was a better way to handle the arrow spacing, and I’ll keep an eye out for this pattern in future clean-ups.

Regression fixes are part of the process, and I’m always happy to improve my approach.
If you have any specific guidance or standards for proposal granularity, feel free to share — I’m always open to learning.

Comment on lines +564 to +573
{({hovered}) => {
return (
<Icon
src={Expensicons.ArrowRight}
fill={theme.icon}
additionalStyles={!hovered && styles.opacitySemiTransparent}
small
/>
);
}}

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.