Skip to content

Replace popover menu with scrollable tabs on Reports screen#84036

Open
GCyganek wants to merge 46 commits intoExpensify:mainfrom
software-mansion-labs:@GCyganek/scrollable-tabs-reports-page
Open

Replace popover menu with scrollable tabs on Reports screen#84036
GCyganek wants to merge 46 commits intoExpensify:mainfrom
software-mansion-labs:@GCyganek/scrollable-tabs-reports-page

Conversation

@GCyganek
Copy link
Contributor

@GCyganek GCyganek commented Mar 3, 2026

Explanation of Change

Replacing popover menu with scrollable tabs row displayed above the search input on the Reports page

Fixed Issues

$ #82231
PROPOSAL: N/A

Tests

  • Verify that no errors appear in the JS console

On narrow screen open Reports screen:

  1. Verify there is no popover menu button next to the Search for something input
  2. Verify there are tabs above the Search for something input with all search types that were in the removed popover menu
  3. Test by switching to different search types using these tabs and make sure that there is no regression
  4. Verify that navigating back (back button on browser or back gesture on Android) goes back to the previously selected search type and that selected tab is changed correctly
  5. Scroll down and verify that the top menu with input, filters and tabs hides completely and that there is no regression

Offline 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
Screen.Recording.2026-03-04.at.10.19.35.mov
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-03-04.at.10.34.10.mov
iOS: mWeb Safari
MacOS: Chrome / Safari

safari:

Screen.Recording.2026-03-04.at.10.35.10.mov

edge:

Screen.Recording.2026-03-04.at.10.18.57.mov
Screen.Recording.2026-03-06.at.10.36.23.mov
Screenshot 2026-03-06 at 10 37 17

GCyganek and others added 8 commits February 19, 2026 14:19
Rename the custom history action from SET_HISTORY_PARAM to PUSH_PARAMS to
better reflect its purpose: pushing a route snapshot onto the history stack
when params change, enabling back-navigation through param changes without
extra routes. Simplify the history entries to store full route snapshots
instead of string keys, and remove the unused getId prop from
SearchFullscreenNavigator.
@GCyganek GCyganek changed the title @g cyganek/scrollable tabs reports page Replace popover menu with scrollable tabs on Reports screen Mar 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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

@github-actions

This comment has been minimized.

@JmillsExpensify
Copy link
Contributor

Tried to take this for a spin but having trouble with the adhocs on my phone. Going to reach out to Vit.

@trjExpensify
Copy link
Contributor

Definitely feels a lot cleaner taking it for an early spin! Couple of initial notes:

  • The Todos lost their counts. I think we need to bring those back, so you don't have to click into Submit, Approve, Pay etc to know that you have something to do.
  • I think the filters row should hide as you scroll the page, as it does now.

@JmillsExpensify
Copy link
Contributor

Also, we need to talk about that large search input. It's hard for me to overlook it, and I think it's really getting in the way (for not a lot of gain, activity-wise).

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #84036.

Android 🤖 iOS 🍎
⏩ SKIPPED ⏩ https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-ios-device-AdHoc-0ee328c-cd8cd82-d806023d2ed8bf41452c0502801db464720ef6ad/index.html
The build for Android was skipped iOS
Web 🕸️
https://84036.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

@JmillsExpensify
Copy link
Contributor

Ok, so I took the latest adhoc for a test run. I take back what I said about the search input. Like I don't necessarily love it, but I think that I can live with it. That "exposed" Type filter though. The UX is pretty weird. Let me give something examples to show what I'm talking about.

First, I land on Reports, see a Reports tab bar at the top, then a Type: Expense Report filter. We're saying the same thing in a really small area.

Captura de pantalla 2026-03-03 a la(s) 22 30 28

Next, I go to Expenses and see similar. Expenses at the top, followed by Type: Expense. Ugh, ok yeah more duplication.
Captura de pantalla 2026-03-03 a la(s) 22 30 51

Even the search results feel confusing (especially with no indication that I'm on a search results page). Now now top tabs are selected but I'm on `Type: Expense".
Captura de pantalla 2026-03-03 a la(s) 22 30 09

Now the core functionality works great! I didn't experience any issues. And this does improve on what we have. So I think the decision ahead of us is whether we go with this now, or if we wait for some of @dubielzyk-expensify's upcoming filter changes first. After all, in those discussions we've discussed several times not showing the Type filter at all.

@codecov
Copy link

codecov bot commented Mar 4, 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 Δ
src/CONST/index.ts 93.54% <ø> (ø)
.../Search/SearchPageHeader/SearchPageHeaderInput.tsx 45.73% <ø> (-3.17%) ⬇️
src/components/TabSelector/TabLabel.tsx 100.00% <100.00%> (+100.00%) ⬆️
src/components/TabSelector/TabSelector.tsx 0.00% <ø> (ø)
src/components/TabSelector/TabSelectorBase.tsx 92.85% <100.00%> (+84.52%) ⬆️
src/components/TabSelector/TabSelectorItem.tsx 100.00% <100.00%> (ø)
...on/AppNavigator/createRootStackNavigator/index.tsx 100.00% <ø> (ø)
...avigator/createSearchFullscreenNavigator/index.tsx 0.00% <ø> (ø)
...n/AppNavigator/createSplitNavigator/SplitRouter.ts 85.24% <100.00%> (+0.76%) ⬆️
...ator/routerExtensions/addSidebarRouterExtension.ts 100.00% <100.00%> (ø)
... and 9 more
... and 15 files with indirect coverage changes

@GCyganek
Copy link
Contributor Author

GCyganek commented Mar 4, 2026

  • I think the filters row should hide as you scroll the page, as it does now.

Good catch, will fix that! Edit: Fixed

  • The Todos lost their counts. I think we need to bring those back, so you don't have to click into Submit, Approve, Pay etc to know that you have something to do.

Will something like this work? This is selected, hovered and inactive state (EDIT: added):

Screenshot 2026-03-04 at 10 45 22

@shawnborton
Copy link
Contributor

Also, for too long tabs, is it ok if I set 256px max width on a tab label? It looks like this:

That works for me.

Hmm good catch, I don't think there will be option to rename/delete saved search now with the tabs.

Could we launch the overflow menu if we long press the tab?

@GCyganek
Copy link
Contributor Author

Could we launch the overflow menu if we long press the tab?

Yeah, should be doable, working on it...

@GCyganek
Copy link
Contributor Author

Done:

Screen.Recording.2026-03-11.at.15.19.00.mov

@shawnborton
Copy link
Contributor

Nice, that looks good to me

@aimane-chnaif
Copy link
Contributor

Are all bugs fixed?

@GCyganek
Copy link
Contributor Author

GCyganek commented Mar 11, 2026

Bug: after deleting saved search on another device, page still remaining while tab is switched to wrong one

@aimane-chnaif are you able to reproduce this now? I've just tried a few times and it works as on production. Other than this, I think I fixed everything

Also, big kudos to you for catching all these things!

@aimane-chnaif
Copy link
Contributor

Please merge main

@aimane-chnaif
Copy link
Contributor

Conflicts!

@aimane-chnaif
Copy link
Contributor

Is it expected to show saved search in the end? On web, it's in the middle.

Screenshot 2026-03-11 at 3 12 46 pm

@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented Mar 11, 2026

Bug: after deleting saved search on another device, page still remaining while tab is switched to wrong one

@aimane-chnaif are you able to reproduce this now? I've just tried a few times and it works as on production. Other than this, I think I fixed everything

Here's repro step:

  1. Web: type test and search
  2. Web: go to Filters > Save search
  3. Web/Mobile: Observe that type:expense test tab appears
  4. Web/Mobile: go to type:expense test tab
  5. Web: delete saved search
  6. Web: redirected to Expenses tab
  7. Mobile: page remaining with no tab selected
Screen.Recording.2026-03-11.at.3.14.02.pm.mov

@GCyganek
Copy link
Contributor Author

Is it expected to show saved search in the end? On web, it's in the middle.

True, will update

@GCyganek
Copy link
Contributor Author

GCyganek commented Mar 11, 2026

Here's repro step:

  1. Web: type test and search
  2. Web: go to Filters > Save search
  3. Web/Mobile: Observe that type:expense test tab appears
  4. Web/Mobile: go to type:expense test tab
  5. Web: delete saved search
  6. Web: redirected to Expenses tab
  7. Mobile: page remaining with no tab selected

Thank you, I think it works the same as on production (tested on main branch here):

Screen.Recording.2026-03-11.at.16.36.37.mov

Even if we would want to have the same behaviour on both (reset to Expense), I'm not sure if it's worth the effort considering the rarity of this scenario 🤔

@aimane-chnaif
Copy link
Contributor

Here's repro step:

  1. Web: type test and search
  2. Web: go to Filters > Save search
  3. Web/Mobile: Observe that type:expense test tab appears
  4. Web/Mobile: go to type:expense test tab
  5. Web: delete saved search
  6. Web: redirected to Expenses tab
  7. Mobile: page remaining with no tab selected

Thank you, I think it works the same as on production (tested on main branch here):

Screen.Recording.2026-03-11.at.16.36.37.mov
Even if we would want to have the same behaviour on both (reset to Expense), I'm not sure if it's worth the effort considering the rarity of this scenario 🤔

Agree. "Secondary device" is edge case.
But worth mentioning here in case bug is reported later and treated as blocker/regression.

@GCyganek
Copy link
Contributor Author

Is it expected to show saved search in the end? On web, it's in the middle.

Should be fixed now

Screen.Recording.2026-03-11.at.17.02.07.mov

@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented Mar 11, 2026

Bug: animation glitch in navigation transition. Blank screen briefly appears
Tested on iOS native

Screen.Recording.2026-03-11.at.4.15.15.pm.mov

@aimane-chnaif
Copy link
Contributor

Bug: offline feedback reverted after renaming saved search offline and switching tabs

Screen.Recording.2026-03-11.at.4.19.58.pm.mov

@GCyganek
Copy link
Contributor Author

Bug: animation glitch in navigation transition. Blank screen briefly appears Tested on iOS native

Just tested with main branch and it works the same so there is no regression on this PR:

Screen.Recording.2026-03-11.at.17.34.43.mov

I'm done for the day, so will check remaining bugs first thing tomorrow morning

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 166ccbdde8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@GCyganek
Copy link
Contributor Author

Back on it, will fix conflicts, answer ai comments and check the last bug

@GCyganek
Copy link
Contributor Author

GCyganek commented Mar 12, 2026

Bug: offline feedback reverted after renaming saved search offline and switching tabs

Fixed:

Screen.Recording.2026-03-12.at.17.07.03.mov

@GCyganek
Copy link
Contributor Author

@aimane-chnaif ready!

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.

9 participants