-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[HOLD][Insights][Release 9] Seed Spend over time suggested search #81070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@jayeshmangwani 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] |
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index a2c9fb43..2f0294bf 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -771,7 +771,7 @@ const translations: TranslationDeepObject<typeof en> = {
revoke: 'Widerrufen',
title: 'Gesicht/Fingerabdruck & Passkeys',
explanation:
- 'Die Gesichts-/Fingerabdruck- oder Passkey-Verifizierung ist auf einem oder mehreren Geräten aktiviert. Durch das Widerrufen des Zugriffs wird für die nächste Verifizierung auf jedem Gerät ein magischer Code erforderlich',
+ 'Gesichts-/Fingerabdruck- oder Passkey-Verifizierung ist auf einem oder mehreren Geräten aktiviert. Das Widerrufen des Zugriffs erfordert für die nächste Verifizierung auf jedem Gerät einen Magic Code',
confirmationPrompt: 'Bist du sicher? Du benötigst einen magischen Code für die nächste Verifizierung auf jedem Gerät',
cta: 'Zugriff widerrufen',
noDevices: 'Du hast keine Geräte für Gesichts-/Fingerabdruck- oder Passkey-Verifizierung registriert. Wenn du welche registrierst, kannst du den Zugriff hier widerrufen.',
@@ -7241,7 +7241,7 @@ Fordere Spesendetails wie Belege und Beschreibungen an, lege Limits und Standard
addedConnection: ({connectionName}: ConnectionNameParams) => `verbunden mit ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`,
leftTheChat: 'hat den Chat verlassen',
companyCardConnectionBroken: ({feedName, workspaceCompanyCardRoute}: {feedName: string; workspaceCompanyCardRoute: string}) =>
- `Die ${feedName}-Verbindung ist unterbrochen. Um Kartenimporte wiederherzustellen, <a href='${workspaceCompanyCardRoute}'>melden Sie sich bei Ihrer Bank an</a>`,
+ `Die Verbindung zu ${feedName} ist unterbrochen. Um Kartenimporte wiederherzustellen, <a href='${workspaceCompanyCardRoute}'>melden Sie sich bei Ihrer Bank an</a>`,
plaidBalanceFailure: ({maskedAccountNumber, walletRoute}: {maskedAccountNumber: string; walletRoute: string}) =>
`die Plaid-Verbindung zu Ihrem Geschäftsbankkonto ist unterbrochen. Bitte <a href='${walletRoute}'>verbinden Sie Ihr Bankkonto ${maskedAccountNumber} erneut</a>, damit Sie Ihre Expensify-Karten weiterhin nutzen können.`,
settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) =>
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 06da9a5e..e7917016 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -774,7 +774,7 @@ const translations: TranslationDeepObject<typeof en> = {
revoke: 'Révoquer',
title: 'Reconnaissance faciale/empreinte digitale et passkeys',
explanation:
- 'La vérification par reconnaissance faciale/empreinte digitale ou par passkey est activée sur un ou plusieurs appareils. Révoquer l’accès exigera un code magique pour la prochaine vérification sur n’importe quel appareil',
+ 'La vérification par visage/empreinte digitale ou par clé d’accès est activée sur un ou plusieurs appareils. La révocation de l’accès exigera un code magique pour la prochaine vérification sur n’importe quel appareil',
confirmationPrompt: 'Êtes-vous sûr ? Vous aurez besoin d’un code magique pour la prochaine vérification sur n’importe quel appareil',
cta: 'Révoquer l’accès',
noDevices:
@@ -7115,7 +7115,7 @@ Exigez des informations de dépense comme les reçus et les descriptions, défin
[CONST.SEARCH.GROUP_BY.YEAR]: 'Années',
[CONST.SEARCH.GROUP_BY.QUARTER]: 'Trimestres',
},
- spendOverTime: 'Dépenses au fil du temps',
+ spendOverTime: 'Dépense dans le temps',
},
genericErrorPage: {
title: 'Oh oh, quelque chose s’est mal passé !',
@@ -7253,7 +7253,7 @@ Exigez des informations de dépense comme les reçus et les descriptions, défin
addedConnection: ({connectionName}: ConnectionNameParams) => `connecté à ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`,
leftTheChat: 'a quitté la discussion',
companyCardConnectionBroken: ({feedName, workspaceCompanyCardRoute}: {feedName: string; workspaceCompanyCardRoute: string}) =>
- `La connexion à ${feedName} est rompue. Pour rétablir l'importation des cartes, <a href='${workspaceCompanyCardRoute}'>connectez-vous à votre banque</a>`,
+ `La connexion ${feedName} est interrompue. Pour rétablir l’importation des cartes, <a href='${workspaceCompanyCardRoute}'>connectez-vous à votre banque</a>`,
plaidBalanceFailure: ({maskedAccountNumber, walletRoute}: {maskedAccountNumber: string; walletRoute: string}) =>
`la connexion Plaid à votre compte bancaire professionnel est interrompue. Veuillez <a href='${walletRoute}'>reconnecter votre compte bancaire ${maskedAccountNumber}</a> pour continuer à utiliser vos cartes Expensify.`,
settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) =>
diff --git a/src/languages/it.ts b/src/languages/it.ts
index d9325906..daf17207 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -772,7 +772,7 @@ const translations: TranslationDeepObject<typeof en> = {
revoke: 'Revoca',
title: 'Riconoscimento facciale/impronta digitale & passkey',
explanation:
- 'La verifica con volto/impronta digitale o passkey è abilitata su uno o più dispositivi. La revoca dell’accesso richiederà un codice magico per la prossima verifica su qualsiasi dispositivo',
+ 'La verifica tramite volto/impronta digitale o passkey è abilitata su uno o più dispositivi. La revoca dell’accesso richiederà un codice magico per la prossima verifica su qualsiasi dispositivo',
confirmationPrompt: 'Sei sicuro? Ti servirà un codice magico per la prossima verifica su qualsiasi dispositivo',
cta: 'Revoca accesso',
noDevices: 'Non hai alcun dispositivo registrato per la verifica con volto/impronta digitale o passkey. Se ne registri uno, potrai revocare tale accesso da qui.',
@@ -7230,7 +7230,7 @@ Richiedi dettagli di spesa come ricevute e descrizioni, imposta limiti e valori
addedConnection: ({connectionName}: ConnectionNameParams) => `connesso a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`,
leftTheChat: 'ha lasciato la chat',
companyCardConnectionBroken: ({feedName, workspaceCompanyCardRoute}: {feedName: string; workspaceCompanyCardRoute: string}) =>
- `La connessione ${feedName} non funziona. Per ripristinare le importazioni delle carte, <a href='${workspaceCompanyCardRoute}'>accedi alla tua banca</a>`,
+ `La connessione ${feedName} è interrotta. Per ripristinare le importazioni delle carte, <a href='${workspaceCompanyCardRoute}'>accedi alla tua banca</a>`,
plaidBalanceFailure: ({maskedAccountNumber, walletRoute}: {maskedAccountNumber: string; walletRoute: string}) =>
`la connessione Plaid al tuo conto bancario aziendale è interrotta. <a href='${walletRoute}'>Ricollega il tuo conto bancario ${maskedAccountNumber}</a> per continuare a usare le tue carte Expensify.`,
settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) =>
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 5d1be06c..a9164669 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -770,8 +770,8 @@ const translations: TranslationDeepObject<typeof en> = {
revoke: {
revoke: '取り消す',
title: '顔/指紋 & パスキー',
- explanation: '1 台以上のデバイスで顔 / 指紋またはパスキー認証が有効になっています。アクセスを取り消すと、今後どのデバイスでも次回の認証時にマジックコードが必要になります',
- confirmationPrompt: '本当に実行しますか?次回、どのデバイスで確認する場合でも、マジックコードが必要になります',
+ explanation: '1 つ以上のデバイスで顔認証/指紋認証またはパスキー認証が有効になっています。アクセスを取り消すと、今後どのデバイスでも次回の認証時にマジックコードが必要になります',
+ confirmationPrompt: '本当に実行してもよろしいですか?今後、どのデバイスでの次回認証にもマジックコードが必要になります',
cta: 'アクセスを取り消す',
noDevices: '顔認証 / 指紋認証 またはパスキー認証用に登録されているデバイスがありません。 \nいずれかを登録すると、ここでそのアクセスを取り消せるようになります。',
dismiss: '了解',
@@ -7030,7 +7030,7 @@ ${reportName}
[CONST.SEARCH.GROUP_BY.YEAR]: '年',
[CONST.SEARCH.GROUP_BY.QUARTER]: '四半期',
},
- spendOverTime: '時間別支出',
+ spendOverTime: '期間別支出',
},
genericErrorPage: {
title: 'おっと、問題が発生しました!',
@@ -7167,7 +7167,7 @@ ${reportName}
addedConnection: ({connectionName}: ConnectionNameParams) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} に接続済み`,
leftTheChat: 'チャットを退出しました',
companyCardConnectionBroken: ({feedName, workspaceCompanyCardRoute}: {feedName: string; workspaceCompanyCardRoute: string}) =>
- `${feedName} との接続が切断されています。カードの取引明細の取り込みを再開するには、<a href='${workspaceCompanyCardRoute}'>銀行にログイン</a>してください`,
+ `${feedName} 接続が切断されています。カードのインポートを再開するには、<a href='${workspaceCompanyCardRoute}'>銀行にログイン</a>してください`,
plaidBalanceFailure: ({maskedAccountNumber, walletRoute}: {maskedAccountNumber: string; walletRoute: string}) =>
`ビジネス銀行口座へのPlaid接続が切断されています。Expensifyカードを引き続きご利用いただくには、<a href='${walletRoute}'>銀行口座 ${maskedAccountNumber} を再接続</a>してください。`,
settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) =>
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index e5f91fad..5369095a 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7213,7 +7213,7 @@ Vraag verplichte uitgavedetails zoals bonnetjes en beschrijvingen, stel limieten
addedConnection: ({connectionName}: ConnectionNameParams) => `verbonden met ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`,
leftTheChat: 'heeft de chat verlaten',
companyCardConnectionBroken: ({feedName, workspaceCompanyCardRoute}: {feedName: string; workspaceCompanyCardRoute: string}) =>
- `De ${feedName}-verbinding is verbroken. Om kaartimporten te herstellen, <a href='${workspaceCompanyCardRoute}'>log in bij uw bank</a>`,
+ `De ${feedName}-verbinding is verbroken. Log <a href='${workspaceCompanyCardRoute}'>in bij je bank</a> om kaartimports te herstellen`,
plaidBalanceFailure: ({maskedAccountNumber, walletRoute}: {maskedAccountNumber: string; walletRoute: string}) =>
`de Plaid-verbinding met uw zakelijke bankrekening is verbroken. <a href='${walletRoute}'>Verbind uw bankrekening ${maskedAccountNumber} opnieuw</a> om uw Expensify-kaarten te kunnen blijven gebruiken.`,
settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) =>
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 4c5420e9..5c683c85 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -772,8 +772,8 @@ const translations: TranslationDeepObject<typeof en> = {
revoke: 'Unieważnij',
title: 'Rozpoznawanie twarzy/odcisk palca i klucze dostępu',
explanation:
- 'Weryfikacja za pomocą twarzy/odcisku palca lub klucza dostępu (passkey) jest włączona na jednym lub większej liczbie urządzeń. Cofnięcie dostępu spowoduje, że przy następnej weryfikacji na dowolnym urządzeniu wymagany będzie magiczny kod',
- confirmationPrompt: 'Czy na pewno? Będziesz potrzebować magicznego kodu do następnej weryfikacji na dowolnym urządzeniu',
+ 'Weryfikacja za pomocą twarzy/odcisku palca lub klucza dostępu jest włączona na jednym lub większej liczbie urządzeń. Cofnięcie dostępu spowoduje, że przy następnej weryfikacji na dowolnym urządzeniu będzie wymagany magiczny kod',
+ confirmationPrompt: 'Czy na pewno? Będziesz potrzebować magicznego kodu do kolejnej weryfikacji na każdym urządzeniu',
cta: 'Cofnij dostęp',
noDevices:
'Nie masz żadnych urządzeń zarejestrowanych do weryfikacji twarzą, odciskiem palca ani kluczem dostępu. Jeśli jakieś zarejestrujesz, będziesz mógł/mogła cofnąć ten dostęp w tym miejscu.',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index ba717f28..88311482 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7202,7 +7202,7 @@ Exija detalhes de despesas como recibos e descrições, defina limites e padrõe
addedConnection: ({connectionName}: ConnectionNameParams) => `conectado a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`,
leftTheChat: 'saiu do chat',
companyCardConnectionBroken: ({feedName, workspaceCompanyCardRoute}: {feedName: string; workspaceCompanyCardRoute: string}) =>
- `A conexão ${feedName} está quebrada. Para restaurar as importações do cartão, <a href='${workspaceCompanyCardRoute}'>faça login no seu banco</a>`,
+ `A conexão com ${feedName} está interrompida. Para restaurar as importações do cartão, <a href='${workspaceCompanyCardRoute}'>faça login no seu banco</a>`,
plaidBalanceFailure: ({maskedAccountNumber, walletRoute}: {maskedAccountNumber: string; walletRoute: string}) =>
`a conexão Plaid com sua conta bancária empresarial está quebrada. Por favor, <a href='${walletRoute}'>reconecte sua conta bancária ${maskedAccountNumber}</a> para continuar usando seus Cartões Expensify.`,
settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) =>
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 86082899..5f009d04 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -766,8 +766,8 @@ const translations: TranslationDeepObject<typeof en> = {
revoke: {
revoke: '撤销',
title: '面部识别/指纹识别与通行密钥',
- explanation: '在一台或多台设备上已启用面部 / 指纹或通行密钥验证。撤销访问权限后,下次在任何设备上进行验证时都需要使用魔法验证码',
- confirmationPrompt: '你确定吗?在任何设备上进行下一步验证时,你都需要一个魔法代码',
+ explanation: '在一台或多台设备上已启用面容/指纹或通行密钥验证。撤销访问后,下次在任何设备上进行验证时都需要输入魔法码',
+ confirmationPrompt: '你确定吗?接下来的验证在任何设备上你都需要一组魔法代码',
cta: '撤销访问权限',
noDevices: '您尚未注册任何用于人脸/指纹或通行密钥验证的设备。如果您注册了设备,您将可以在此撤销其访问权限。',
dismiss: '明白了',
@@ -6909,7 +6909,7 @@ ${reportName}
[CONST.SEARCH.GROUP_BY.YEAR]: '年',
[CONST.SEARCH.GROUP_BY.QUARTER]: '季度',
},
- spendOverTime: '一段时间内的支出',
+ spendOverTime: '随时间支出',
},
genericErrorPage: {
title: '哎呀,出错了!',
@@ -7041,7 +7041,7 @@ ${reportName}
addedConnection: ({connectionName}: ConnectionNameParams) => `已连接到 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`,
leftTheChat: '已离开聊天',
companyCardConnectionBroken: ({feedName, workspaceCompanyCardRoute}: {feedName: string; workspaceCompanyCardRoute: string}) =>
- `${feedName} 连接已中断。要恢复卡片导入,请<a href='${workspaceCompanyCardRoute}'>登录到您的银行</a>`,
+ `${feedName} 连接已中断。要恢复导入卡片交易,请<a href='${workspaceCompanyCardRoute}'>登录您的银行</a>`,
plaidBalanceFailure: ({maskedAccountNumber, walletRoute}: {maskedAccountNumber: string; walletRoute: string}) =>
`您的企业银行账户的 Plaid 连接已中断。请<a href='${walletRoute}'>重新连接您的银行账户 ${maskedAccountNumber}</a>,以便继续使用您的 Expensify 卡。`,
settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) =>
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
| shouldShowTopSpendersSuggestion ||= isEligibleForTopSpendersSuggestion; | ||
| shouldShowTopCategoriesSuggestion ||= isEligibleForTopCategoriesSuggestion; | ||
| shouldShowTopMerchantsSuggestion ||= isEligibleForTopMerchantsSuggestion; | ||
| shouldShowSpendOverTimeSuggestion ||= isEligibleForSpendOverTimeSuggestion; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ PERF-2 (docs)
The early return optimization in the .some() callback (lines ~860-872) is incomplete. It checks if all suggestions are visible to short-circuit iteration, but its missing shouldShowSpendOverTimeSuggestion from the condition.
Issue: After adding the new shouldShowSpendOverTimeSuggestion variable and tracking its state, the early return condition was not updated. This means even when all suggestions (including SPEND_OVER_TIME) are visible, the loop continues checking remaining policies unnecessarily.
Fix: Add && shouldShowSpendOverTimeSuggestion to the return statement:
return (
shouldShowSubmitSuggestion &&
// ... other conditions ...
shouldShowTopMerchantsSuggestion &&
shouldShowSpendOverTimeSuggestion // Add this
);Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this 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: 1a464e1742
ℹ️ 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".
| VIEW: { | ||
| TABLE: 'table', | ||
| BAR: 'bar', | ||
| LINE: 'line', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid exposing unimplemented line chart view
Adding LINE to CONST.SEARCH.VIEW makes “Line” appear in the view picker because getViewOptions maps Object.values(CONST.SEARCH.VIEW). However, chart rendering only supports bar charts (shouldShowChartView checks view === BAR, and SearchChartView maps only BAR), so selecting “Line” will silently fall back to the table view instead of a line chart. This is a user-visible regression introduced by this commit: users can now choose a view that is not implemented. Consider keeping LINE out of the selectable views until a line chart renderer is wired up or gating it behind a feature flag.
Useful? React with 👍 / 👎.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Held on #81049
Explanation of Change
Doc section https://docs.google.com/document/d/1L2gAchD5IrI545p_iVAMdh6DSnJJcusG90oO-5MH3x0/edit?tab=t.0#heading=h.ckd2zio21z1v
Fixed Issues
$ #80803
PROPOSAL:
Tests
Test Case 1: "Spend Over Time" appears in Insights section
Steps:
Expected Result:
Test Case 2: "Spend Over Time" visibility restrictions
Steps:
Expected Result:
Test Case 3: "Spend Over Time" search opens correctly
Steps:
Expected Result:
✅ Search opens without crashing
✅ Results grouped by month (most recent first)
✅ Bar chart view displays correctly
✅ Only year-to-date expenses shown
Verify that no errors appear in the JS console
Offline 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
iOS: mWeb Safari
MacOS: Chrome / Safari