Repository navigation
[CP staging] Fix Merchant quick filter popup collapsing on native - #104141
Conversation
…on native Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
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.
|
|
@MelvinBot Mark this PR as ready |
|
🤖 Marked this PR as ready for review. Before reviewers start, fill out the Tests, Offline tests, and QA Steps sections in the PR body. They still contain the TODO placeholders. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03b6d2460a
ℹ️ 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".
| <NegatableFilter | ||
| baseFilterKey={baseFilterKey} | ||
| value={value} | ||
| isNegated={isNegated} | ||
| merchantOperator={values?.[FILTER_KEYS.MERCHANT_OPERATOR]} | ||
| buttonText={translate('common.apply')} | ||
| sentryLabel={applySentryLabel} | ||
| buttonStyles={styles.mt2} | ||
| onChange={applyChanges} | ||
| /> | ||
| onNegationChange={setIsNegated} | ||
| > | ||
| <TextInput |
There was a problem hiding this comment.
Keep the merchant controls scrollable above the keyboard
On a short native handset, or with larger accessibility text, focusing the merchant input leaves less vertical space than the input, two 64px match-type rows, and Apply button require. These controls now render directly in the bottom sheet without the ScrollView supplied by the removed TextInputFilterContent, while FilterPopupButton explicitly disables the modal's landscape scroll wrapper, so overflowing controls can be clipped with no way to reach them once the keyboard opens. Wrap this content in a height-constrained scroll container, or otherwise preserve scrolling while avoiding the previous flex-collapse.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The comment is valid, but it only affects an edge case. On a short phone, or with large accessibility text, the open keyboard can push the match-type rows or Apply out of view. You then can't scroll to them.
Why it can happen: this PR removed the ScrollView from the chip popup to fix the collapse, and FilterPopupButton.tsx:156 turns off the modal's fallback scroll. The popup has more content than TextFilterPopup because of the two 64px match-type rows.
Recommended fix: use the pattern DateSelectPopup already uses in the same popover:
- Wrap the input and match-type selector in a plain
ScrollViewwith noflex1and withkeyboardShouldPersistTaps="handled". Leave Apply outside it. - Give the container a
maxHeightso the scroll view has a limit to shrink to.
A plain ScrollView sizes to its content, so it won't bring back the zero-height collapse. That collapse came from the flex1 root in TextInputFilterContent. DisplayPopup.tsx:86 already uses a plain ScrollView in this popover on native.
I didn't push this. The risk is on native, and this run could only test on web. To have me make the change and check it on Android, reply @MelvinBot implement this and test on Android.
There was a problem hiding this comment.
@MelvinBot could we cap the popup with style={styles.getPopoverMaxHeight(windowHeight, isInLandscapeMode)} on BasePopup (like ReportFieldPopup) and wrap the NegatableFilter + MerchantMatchTypeSelector in a ScrollView with styles.flexShrink1 and keyboardShouldPersistTaps="handled", similar to DateSelectPopup? Without flex1 it stays content-sized and only shrinks/scrolls when it hits the max height, so the Apply button stays visible in landscape and with the keyboard open.
There was a problem hiding this comment.
I pushed a fix for the landscape cutoff in 98bbd8f. The popup now scrolls when its controls don't fit, and Apply stays visible below the scroll area.
What changed in MerchantFilterPopup.tsx:
- The popup gets a max height from
styles.getPopoverMaxHeight(windowHeight, isInLandscapeMode). That's 75% of the window height in landscape, the same limitReportFieldPopupuses. - The toggle, input, and match-type selector are wrapped in a plain
ScrollViewwithkeyboardShouldPersistTaps="handled". It has noflex1, so it sizes to its content and the original zero-height collapse doesn't come back.
Checks: the MerchantFilterPopupTest and MerchantFilterContentTest suites (10 tests), typecheck, lint, the React Compiler check, and the formatter all pass on the changed file.
Not tested in the UI: this run only had a web session, and it never got past sign-in (a blank page), so I couldn't open the popup. I haven't checked landscape on iOS or Android. Please recheck your landscape case on both, or ask me to test it on Android.
view run · no recording available
|
⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai. |
|
|
…h as in landscape Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
@neil-marcellini 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] |
Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
Done. I added The earlier commit 98bbd8f already had the rest of what you asked for:
The popup now fits its content and only shrinks and scrolls when it reaches the max height. That keeps Apply visible. Checks run: |
|
The code looks good to me, I reviewed up to before that last commit. Can you pls show test evidence for landscape on Android? Then it should be good to go @truph01. |
|
@MelvinBot The Apply button isn't fully visible when the keyboard is open in landscape mode.
|
Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
I pushed a fix in Cause: the popup's max height was 75% of the window height in landscape, and it ignored the keyboard. The popover moves up by the keyboard's height to stay above it. In landscape, the keyboard covers about half the screen, so the 75% cap pushed Apply behind the keyboard. Fix: in Checks passed: Not tested on a device: this run could only test on web, and the bug only happens with a native keyboard. Please confirm on iOS and Android in landscape with the keyboard open. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-10-16.at.04.03.04.movScreen.Recording.2026-10-16.at.04.03.18.movAndroid: mWeb ChromeScreen.Recording.2026-10-16.at.04.00.38.moviOS: HybridAppScreen.Recording.2026-10-16.at.03.53.57.movScreen.Recording.2026-10-16.at.03.55.01.moviOS: mWeb SafariScreen.Recording.2026-10-16.at.03.56.11.movMacOS: Chrome / SafariScreen.Recording.2026-10-16.at.04.04.05.mov |
neil-marcellini
left a comment
There was a problem hiding this comment.
I think it's good to go
|
For Melvin PRs from C+ the reviewer checklist is effectively the author checklist, so I'm going to merge this without it. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 neil-marcellini has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
…erPopupNative [CP staging] Fix Merchant quick filter popup collapsing on native (cherry picked from commit f5ed466) (cherry-picked to staging by cristipaval)
|
🔁 Filed a Staging retest request for deploy blockers #104133 after this PR was cherry-picked to staging. |
|
🚀 Cherry-picked to staging by https://github.com/cristipaval in version: 9.5.12-1 🚀
|
|
No help site update is needed. This PR is a native layout bug fix: the Merchant quick filter popup now shows its input and match-type options as users already expect, so no article sentence becomes incorrect. |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.12-1 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/cristipaval in version: 9.5.13-0 🚀
|
|
No help site update is needed. This PR only fixes the layout of the Merchant quick filter popup on native, including the later keyboard and landscape fixes, so the popup now works the way users already expect and no article sentence becomes incorrect. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.13-6 🚀
Bundle Size Analysis (Sentry): |










Explanation of Change
On native, the Merchant quick-filter chip popup only showed the "Merchant" label and the Apply button.
The chip popup reused
MerchantFilterContent→TextInputFilterContent, which was built for the full-height advanced filters page. That component has aflex1root and puts the input and match-type list in aScrollView. The chip popover sizes to its content, so on native theScrollViewgot 0 height and its contents collapsed. Web was not affected because a webScrollViewgrows to fit its content.This PR builds
MerchantFilterPopupthe same way asTextFilterPopup, so it sizes to its content:NegatableFilter,TextInput, andMerchantMatchTypeSelectordirectly inBasePopup, and uses the defaultBasePopupApply button.getMerchantFilterFormValueshelper inSearchQueryUtilsbuilds the form values.MerchantFilterContent(advanced filters page) and the chip popup both use it.The advanced filters page layout is unchanged.
AI tests run (MelvinBot):
npm testforMerchantFilterPopupTest,MerchantFilterContentTest, andSearchQueryUtilsTest(521 tests, including new tests for the popup and helper),npm run typecheck,npm run lint-changed,npm run fmt(no diff),npm run spell-changed, and the React Compiler compliance check on the changed components.Fixed Issues
$ #104133
PROPOSAL: #104133 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari