Repository navigation
[Payment due @QichenZhu] Add Rejected search filter for expenses and expense reports - #103309
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
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.
|
…cted-search-filter # Conflicts: # src/libs/SearchParser/autocompleteParser.js # src/libs/SearchParser/searchParser.js
|
@QichenZhu 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] |
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: fb243dfbfe
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| if (key === FILTER_KEYS.BILLABLE || key === FILTER_KEYS.REIMBURSABLE) { | ||
| if (key === FILTER_KEYS.BILLABLE || key === FILTER_KEYS.REIMBURSABLE || key === FILTER_KEYS.DECLINED) { |
There was a problem hiding this comment.
Translate negated Rejected filter values
When a user enters a negated query such as -declined:yes, buildFilterFormValuesFromQuery() stores the value under declinedNot, so this positive-only condition is skipped and the generic fallback returns the raw syntax token. As a result, filter chips and saved-search summaries show lowercase English yes/no (including in non-English locales) instead of the localized common.yes/common.no used for declined; handle DECLINED_NOT in the translated boolean branch as well.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 83d1cac. Negated Billable, Reimbursable and Rejected chips now show the translated Yes/No.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-native.webmAndroid: mWeb Chromeandroid-web.webmiOS: HybridAppios-native.moviOS: mWeb Safariios-web.movMacOS: Chrome / Safarimac-web.mov |
|
Thanks. I don’t think it makes much sense to have Is/Is Not for booleans, so the existing design looks fine to me. Similarly, |
|
@MelvinBot please review this PR for accessibility issues. |
|
VoiceOver announces the "Rejected" menu as "declined, group" and it's not translated. The "Yes" and "No" options are not reachable. voiceover.mov |
Accessibility reviewNo blocking accessibility problems. The Rejected filter reuses existing components that already work with screen readers, and all 11 locales have the new label. Two inherited issues are more noticeable on this filter. Consider fixing them here or in a follow-up.
Checked and fine
This review is based on reading the code. I didn't run a screen reader. |
QichenZhu
left a comment
There was a problem hiding this comment.
Deferring to the internal team on whether we should handle the accessibility issues here or separately.
|
🎯 @QichenZhu, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
JS00001
left a comment
There was a problem hiding this comment.
Since we are adding a new filter, we need to follow our pattern of also creating a new column, and allowing that column to be sorted by
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product
|
Thanks. We implemented only the filter on the backend so far. The column needs backend work first, because the search response has no rejected value per expense or report, and sorting needs a new sortBy:declined with its own query timings. Can I ship the filter here and do the column and sort as a follow-up? I'll open the Auth PR for the response field and sort, then an App PR for the column. |
|
yeah, @c3024 lets make sure we do a follow up to add the col to export, and sorting |
|
@QichenZhu for #103309 (comment), the 'declined' is fine for now, do other filters allow you to reach yes/no? |
The other filters have the same issue. |
|
@c3024 please resolve conflicts. |
|
@c3024 conflicts |
…cted-search-filter # Conflicts: # src/libs/SearchParser/autocompleteParser.js # src/libs/SearchParser/searchParser.js
|
conflicts fixed. |
|
🚧 JS00001 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.5.14-0 🚀
|
|
A help site update is needed. I opened a draft docs PR: Docs updates for E/A#103309 Add declined search operator for rejected expenses and reports This PR adds a new Rejected filter for all users (not beta-gated), so it counts as a new feature. The edit adds a @c3024, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.14-3 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #104496 |



Explanation of Change
Adds a "Rejected" Yes/No filter for expenses and expense reports. The query key is
declined:yes/declined:no. It works like Billable: filter list page, filter bar chip, typed query with autocomplete and negation.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/685831
PROPOSAL:
Tests
declined:.declined:noanddeclined:yes.type:expense -declined:yes.Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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