Drop "All" from "All reports", "All expenses" in Spend tabs#88900
Drop "All" from "All reports", "All expenses" in Spend tabs#88900JS00001 merged 4 commits intoExpensify:mainfrom
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 ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
The bug was a sync issue: the modal link text used one translation key ( A good regression test would verify the modal's link text matches the Reports search suggestion label. Add this to import {getSuggestedSearches} from '@libs/SearchUIUtils';
import CONST from '@src/CONST';
it('uses the same translation key for the link text as the Reports search suggestion', () => {
const suggestedSearches = getSuggestedSearches();
const reportsTranslationPath = suggestedSearches[CONST.SEARCH.SEARCH_KEYS.REPORTS].translationPath;
const onConfirm = jest.fn();
renderHook(() =>
useCreateEmptyReportConfirmation({
policyID,
policyName,
onConfirm,
}),
);
// The modal link text must use the same translation key as the Reports search tab
expect(mockTranslate).toHaveBeenCalledWith(reportsTranslationPath);
});This test will fail if anyone changes the translation key in either Note: |
Codecov Report✅ All modified and coverable lines are covered by tests. |
|
@MelvinBot unit test you suggested is failing |
|
The failure is because Simpler approach: Remove the Replace the test with: it('uses the same translation key for the link text as the Reports search suggestion', () => {
const onConfirm = jest.fn();
const {result} = renderHook(() =>
useCreateEmptyReportConfirmation({
policyID,
policyName,
onConfirm,
}),
);
act(() => {
result.current.openCreateReportConfirmation();
});
// Must match the translationPath in getSuggestedSearches for REPORTS (asserted in SearchUIUtilsTest.ts)
expect(mockTranslate).toHaveBeenCalledWith('common.reports');
});And remove the |
@MelvinBot |
|
You're right — The fix is to import {act, render, renderHook} from '@testing-library/react-native';
// ... existing mocks ...
it('modal link text uses the same translation key as the Reports search suggestion', () => {
const onConfirm = jest.fn();
const {result} = renderHook(() =>
useCreateEmptyReportConfirmation({
policyID,
policyName,
onConfirm,
}),
);
act(() => {
result.current.openCreateReportConfirmation();
});
// ConfirmationPrompt is captured but not rendered — render it now
mockTranslate.mockClear();
render(lastShowConfirmModalOptions?.prompt as ReactElement);
// This key must match the translationPath in getSuggestedSearches for REPORTS
expect(mockTranslate).toHaveBeenCalledWith('common.reports');
});
|
|
let lastShowConfirmModalOptions: ShowConfirmModalOptions | undefined;
jest.mock('@hooks/useConfirmModal', () => () => ({
showConfirmModal: jest.fn((options: ShowConfirmModalOptions) => {
lastShowConfirmModalOptions = options; // captured here
// ...
}),
}));To use it, call |
|
PR looks good. Changes are consistent and complete:
One minor note: No issues found. |
|
@bernhardoj 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] |
|
@aimane-chnaif what do you think of keeping the |
|
ok, I just considered avoid duplicated translations. |
| reports: 'Alle rapporten', | ||
| expenses: 'Alle uitgaven', | ||
| reports: 'Rapporten', | ||
| expenses: 'Declaraties', |
There was a problem hiding this comment.
You might be right. I also thought that but if we wanna fix this, it should be global fix which is out of scope.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb Safari |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.3.62-13 🚀
Bundle Size Analysis (Sentry): |
|
Yes, help site changes are required. PR #88900 renames the Spend tab labels from "All reports"/"All expenses" to "Reports"/"Expenses", and 3 navigation references in the help docs still use the old names. Draft PR created: #89011 Changes in
No other help site files reference these as UI labels (the other grep hits are regular English, not UI navigation instructions). Note: I was unable to add the PR to project 196 due to permissions — please add it manually: |
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.3.63-1 🚀
Bundle Size Analysis (Sentry): |
|
Yes, help site changes are required. The Draft PR created: #89015 Changes made to
No other help site articles reference these tab labels as UI navigation instructions.
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.3.64-0 🚀
Bundle Size Analysis (Sentry): |
|
Yes, help site changes are required. PR #88900 renames the Spend tabs from "All reports" → "Reports" and "All expenses" → "Expenses", and there are 3 navigation references in
Draft PR created: #89025 |


Explanation of Change
Fixed Issues
$ #84881
Tests
Expenses(originallyAll expenses),Reports(originallyAll reports) tabs show inExpense reportssectionOffline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
Screen.Recording.2026-04-27.at.10.01.34.am.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-04-27.at.10.01.57.am.mov