Skip to content

Reapply compact table and row styles for report transaction list#89575

Open
Krishna2323 wants to merge 5 commits intoExpensify:mainfrom
Krishna2323:krishna2323/issue/86203-reapply
Open

Reapply compact table and row styles for report transaction list#89575
Krishna2323 wants to merge 5 commits intoExpensify:mainfrom
Krishna2323:krishna2323/issue/86203-reapply

Conversation

@Krishna2323
Copy link
Copy Markdown
Contributor

@Krishna2323 Krishna2323 commented May 5, 2026

Explanation of Change

This PR re-lands two previously reverted PRs (#88296 and #89353) along with fixes for the regressions that caused them to be reverted.

Re-applied PRs:

Regression fixes included:

Fixed Issues

$ #86203
PROPOSAL:

Tests

Pre-requisites:

  • Have a workspace with multiple expenses in a report
  • Some expenses should have violations (e.g., potential duplicates)
  • Have expenses that can be grouped by category or tag

Test 1: Desktop compact table styles in report details (Wide RHP)

  1. Open a report with multiple expenses in the wide RHP
  2. Verify rows have 56px height, 1px borders between them, and highlight background on the table header
  3. Verify the table header has rounded top corners and the last row has rounded bottom corners
  4. Hover over rows — verify hover highlight appears
  5. Click a row — verify it opens the expense details

Test 2: Grouped transactions

  1. Enable "Group by category" or "Group by tag" on the report
  2. Verify group headers have highlight background, 56px height, and 1px bottom border
  3. Verify group header checkboxes align with row checkboxes
  4. Verify the last row in the last group has rounded bottom corners
  5. Expand/collapse groups — verify borders and spacing are correct

Test 3: Selection mode

  1. Select a transaction using the checkbox
  2. Verify the "Select all" checkbox in the header aligns with individual row checkboxes
  3. Select all — verify all checkboxes are checked
  4. Deselect all — verify all checkboxes are unchecked

Test 4: Violations and border radius

  1. Open a report where the last expense has a violation (e.g., "Potential duplicate")
  2. Verify the violation text is visible and the bottom border radius still shows correctly on the last item

Test 5: No regression on mobile/narrow layout

  1. Resize the browser to a narrow width (or test on mobile)
  2. Verify the report detail view looks the same as on main — no compact table styles should apply
  3. Verify spacing between items, group headers, and checkboxes are unchanged

Test 6: Medium screen width

  1. Resize the browser to medium width (800-1024px)
  2. Verify compact table styles do NOT apply — layout should match the non-desktop view

Test 7: Pending expense skeleton

  1. If possible, trigger the pending expense placeholder (deferred submit flow)
  2. Verify the skeleton renders below the last transaction without a double bottom radius

Test 8: Blank Expense

  1. Launch Expensify app.
  2. Create a new account.
  3. Go to Home tab.
  4. Open FAB > Create expense > Manual.
  5. Create a manual expense to self DM.
  6. Verify the created expense in Expenses list is not blank.

Test 8: Blank Expense Last Row

  • Precondition:
    • Have many expenses.
  1. Launch Expensify app.
  2. Go to Spend > Expenses.
  3. Scroll to the bottom.

Test 9: Border style updates

  1. Open the app
  2. Navigate to the Search (Spend) page and find an expense report with multiple child transactions
  3. Expand the report to see child transaction rows
  4. Select all child transactions using the checkboxes
  5. Verify the border between the column sub-header row ("Receipt Type, Date, Status...") and the first child transaction changes color and remains visible (does not blend into the selected background)
  6. Deselect all transactions
  7. Verify the border returns to its normal color
  8. Navigate to the Report details page (click into a report)
  9. Verify the border below the table header row (checkbox + column headers) is visible
  10. Select all transactions using the "Select all" checkbox
  11. Verify the header border changes color and remains visible against the selected background
  12. Deselect all transactions
  13. Verify the border returns to its normal color
  14. Repeat steps 2-13 in dark mode to confirm the border is visible in both themes
  • Verify that no errors appear in the JS console

Offline tests

  • Same as tests

QA Steps

  • Same as tests

  • 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
android_1.mp4
android_2.mp4
web_chrome.mp4

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…AL column style

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

codecov Bot commented May 5, 2026

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
...archList/ListItem/TransactionGroupListExpanded.tsx 62.76% <100.00%> (+0.40%) ⬆️
src/components/TransactionItemRow/index.tsx 83.13% <ø> (ø)
src/styles/utils/index.ts 48.61% <100.00%> (+0.12%) ⬆️
src/styles/variables.ts 100.00% <ø> (ø)
...equestReportView/MoneyRequestReportTableHeader.tsx 0.00% <0.00%> (ø)
...arch/SearchList/ListItem/ExpenseReportListItem.tsx 0.00% <0.00%> (ø)
...h/SearchList/ListItem/TransactionGroupListItem.tsx 72.72% <50.00%> (ø)
...Search/SearchList/ListItem/TransactionListItem.tsx 0.00% <0.00%> (ø)
...equestReportView/MoneyRequestReportGroupHeader.tsx 0.00% <0.00%> (-3.71%) ⬇️
...stReportView/MoneyRequestReportTransactionItem.tsx 0.00% <0.00%> (ø)
... and 1 more
... and 15 files with indirect coverage changes

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

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@Krishna2323 Krishna2323 marked this pull request as ready for review May 5, 2026 06:10
@Krishna2323 Krishna2323 requested review from a team as code owners May 5, 2026 06:11
@melvin-bot melvin-bot Bot requested review from flaviadefaria and situchan and removed request for a team May 5, 2026 06:11
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented May 5, 2026

@situchan Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@Krishna2323
Copy link
Copy Markdown
Contributor Author

Krishna2323 commented May 5, 2026

@JS00001 @situchan @Expensify/design This PR re-lands #88296 and #89353 with fixes for all the regressions that caused the reverts:

Apologies for the reverts. The blank row issue was particularly tricky — it only reproduced on Android and was caused by getSelectedBorderBottomStyle being applied to the pressable container instead of the wrapper, which interfered with the row's layout/animation rendering. Moving it to wrapperStyle resolved it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

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

@situchan
Copy link
Copy Markdown
Contributor

situchan commented May 5, 2026

@situchan
Copy link
Copy Markdown
Contributor

situchan commented May 5, 2026

Bug: divider is invisible on web

this branch:
Screenshot 2026-05-05 at 2 29 17 PM

staging:
Screenshot 2026-05-05 at 2 29 21 PM

@situchan
Copy link
Copy Markdown
Contributor

situchan commented May 5, 2026

On android, I feel the last divider is thinner than others

android

@situchan
Copy link
Copy Markdown
Contributor

situchan commented May 5, 2026

Regression test is completed.
Only #89066 is failing

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.

3 participants