Inbox filters#92146
Draft
youssef-lr wants to merge 9 commits into
Draft
Conversation
Replace the hidden Focus/Priority mode toggle in Account > Preferences with visible tab filters at the top of the Inbox: All, Unread, Expenses, and Direct messages. This gives users immediate, discoverable control over which chats they see. - Add CONST.INBOX_TAB and ONYXKEYS.NVP_INBOX_TAB for tab state - Add filterReportsForInboxTab() post-filter in SidebarUtils - Add InboxTabSelector component using TabSelectorBase with small size - Add 'small' size variant to TabSelector components (28px height, 11px font) - Remove isInFocusMode from the entire report pipeline - Remove PriorityModeHandler, PriorityModeController, FocusModeNotification - Remove PriorityModePage and its route/navigation config - Remove updateChatPriorityMode API command - Update all test files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the Unread tab with a "To do" tab that shows items needing action (GBR/RBR indicators). Rename Direct Messages to DMs. Add a separate Unreads toggle in the Inbox header using a small 20px Switch component. The toggle filters to show only unread items and works across all tabs. State persists via NVP_INBOX_UNREAD_FILTER. - Add 'small' size variant to Switch component (36x20 track, 14x14 thumb) - Add switchTrackSmall/switchThumbSmall styles - Add InboxUnreadToggle component with "Unreads" label + small switch - Update filterReportsForInboxTab to apply unread filter orthogonally Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Simplify inbox filtering to four straightforward tabs: All, Unread, Expenses, and DMs. Remove the separate Unreads toggle and To-do tab in favor of a clean Unread tab that shows only unread and non-muted chats. Pinned/GBR/RBR items show only if they qualify for the active tab filter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts with upstream changes that added isOffline parameter and refactored shouldDisplayReportInLHN to use a params object. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Contributor
🦜 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 e3222cf3a28..6d960942c3b 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -2890,15 +2890,11 @@ ${amount} für ${merchant} – ${date}`,
},
},
focusModeUpdateModal: {
- title: 'Willkommen im #Fokusmodus!',
+ title: 'Willkommen im #focus-Modus!',
prompt: (priorityModePageUrl: string) =>
- `Behalte den Überblick, indem du nur ungelesene Chats oder Chats siehst, die deine Aufmerksamkeit benötigen. Keine Sorge, du kannst das jederzeit in den <a href="${priorityModePageUrl}">Einstellungen</a> ändern.`,
- },
- inboxTabs: {
- all: 'All',
- todo: 'To-do',
- unread: 'Unread',
+ `Behalten Sie den Überblick, indem Sie nur ungelesene Chats oder Chats sehen, die Ihre Aufmerksamkeit erfordern. Keine Sorge, Sie können dies jederzeit in den <a href="${priorityModePageUrl}">Einstellungen</a> ändern.`,
},
+ inboxTabs: {all: 'Alle', todo: 'To-do', unread: 'Ungelesen'},
reportDetailsPage: {
inWorkspace: (policyName: string) => `in ${policyName}`,
generatingPDF: 'PDF erstellen',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index a222c9dd554..9fdf481bb23 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -2769,15 +2769,11 @@ ${amount} para ${merchant} - ${date}`,
},
},
focusModeUpdateModal: {
- title: '¡Bienvenido al modo #concentración!',
- prompt: (priorityModePageUrl) =>
- `Mantente al tanto de todo viendo sólo los chats no leídos o los que necesitan tu atención. No te preocupes, puedes cambiar el ajuste en cualquier momento desde la <a href="${priorityModePageUrl}">configuración</a>.`,
- },
- inboxTabs: {
- all: 'All',
- todo: 'To-do',
- unread: 'Unread',
+ title: '¡Bienvenido al modo #focus!',
+ prompt: (priorityModePageUrl: string) =>
+ `Mantente al tanto de todo viendo solo los chats sin leer o los que necesitan tu atención. No te preocupes, puedes cambiar esto en cualquier momento en los <a href="${priorityModePageUrl}">ajustes</a>.`,
},
+ inboxTabs: {all: 'Todo', todo: 'Pendientes', unread: 'No leído'},
reportDetailsPage: {
inWorkspace: (policyName) => `en ${policyName}`,
generatingPDF: 'Generar PDF',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 48d1f73eb2d..e747b8436ea 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -2814,9 +2814,9 @@ ${amount} pour ${merchant} - ${date}`,
title: 'Modifier l’agent',
agentName: 'Nom de l’agent',
instructions: 'Écrire des instructions personnalisées',
- chatWithAgent: 'Discuter avec l\u2019agent',
+ chatWithAgent: 'Discuter avec l’agent',
copilotIntoAccount: 'Copilote dans le compte',
- deleteAgent: 'Supprimer l\u2019agent',
+ deleteAgent: 'Supprimer l’agent',
deleteAgentTitle: 'Supprimer l’agent ?',
deleteAgentMessage: 'Voulez-vous vraiment supprimer cet agent ? Cette action est irréversible.',
},
@@ -2898,15 +2898,11 @@ ${amount} pour ${merchant} - ${date}`,
},
},
focusModeUpdateModal: {
- title: 'Bienvenue en mode #focus !',
+ title: 'Bienvenue dans le mode #focus !',
prompt: (priorityModePageUrl: string) =>
- `Gardez le contrôle en affichant uniquement les discussions non lues ou celles qui nécessitent votre attention. Ne vous inquiétez pas, vous pouvez modifier ce paramètre à tout moment dans les <a href="${priorityModePageUrl}">paramètres</a>.`,
- },
- inboxTabs: {
- all: 'All',
- todo: 'To-do',
- unread: 'Unread',
+ `Gardez une longueur d’avance en n’affichant que les discussions non lues ou celles qui nécessitent votre attention. Ne vous inquiétez pas, vous pourrez modifier ce paramètre à tout moment dans les <a href="${priorityModePageUrl}">paramètres</a>.`,
},
+ inboxTabs: {all: 'Tout', todo: 'À faire', unread: 'Non lu'},
reportDetailsPage: {
inWorkspace: (policyName: string) => `dans ${policyName}`,
generatingPDF: 'Générer le PDF',
@@ -2989,7 +2985,7 @@ ${amount} pour ${merchant} - ${date}`,
phoneOrEmail: 'Téléphone ou e-mail',
error: {
agentSignInBlocked:
- 'Les comptes d\u2019agent ne permettent pas de se connecter directement. Pour utiliser un agent, connectez-vous avec votre propre compte et accédez-y via Copilot.',
+ 'Les comptes d’agent ne permettent pas de se connecter directement. Pour utiliser un agent, connectez-vous avec votre propre compte et accédez-y via Copilot.',
invalidFormatEmailLogin: 'L’adresse e-mail saisie est invalide. Veuillez corriger le format et réessayer.',
},
cannotGetAccountDetails: 'Impossible de récupérer les détails du compte. Veuillez essayer de vous reconnecter.',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 74008d5b625..d934838ae4d 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -2802,8 +2802,8 @@ ${amount} per ${merchant} - ${date}`,
title: 'Modifica agente',
agentName: 'Nome agente',
instructions: 'Scrivi istruzioni personalizzate',
- chatWithAgent: 'Chatta con l\u2019agente',
- copilotIntoAccount: 'Copilot nell\u2019account',
+ chatWithAgent: 'Chatta con l’agente',
+ copilotIntoAccount: 'Copilot nell’account',
deleteAgent: 'Elimina agente',
deleteAgentTitle: 'Eliminare agente?',
deleteAgentMessage: 'Sei sicuro di voler eliminare questo agente? Questa azione non può essere annullata.',
@@ -2886,15 +2886,11 @@ ${amount} per ${merchant} - ${date}`,
},
},
focusModeUpdateModal: {
- title: 'Benvenuto/a nella modalità #focus!',
+ title: 'Benvenuto nella modalità #focus!',
prompt: (priorityModePageUrl: string) =>
- `Resta sempre aggiornato vedendo solo le chat non lette o quelle che richiedono la tua attenzione. Non preoccuparti, puoi modificare questa impostazione in qualsiasi momento nelle <a href="${priorityModePageUrl}">impostazioni</a>.`,
- },
- inboxTabs: {
- all: 'All',
- todo: 'To-do',
- unread: 'Unread',
+ `Resta al passo visualizzando solo le chat non lette o quelle che richiedono la tua attenzione. Non preoccuparti, puoi modificare questa impostazione in qualsiasi momento nelle <a href="${priorityModePageUrl}">impostazioni</a>.`,
},
+ inboxTabs: {all: 'Tutti', todo: 'Da fare', unread: 'Non letti'},
reportDetailsPage: {
inWorkspace: (policyName: string) => `in ${policyName}`,
generatingPDF: 'Genera PDF',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 846c4766166..bc4c425a464 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -2862,15 +2862,11 @@ ${date} の ${merchant} への ${amount}`,
},
},
focusModeUpdateModal: {
- title: '#focusモードへようこそ!',
+ title: '#focus モードへようこそ!',
prompt: (priorityModePageUrl: string) =>
- `未読のチャットや対応が必要なチャットだけを表示して、常に状況を把握しましょう。いつでも<a href="${priorityModePageUrl}">設定</a>から変更できます。`,
- },
- inboxTabs: {
- all: 'All',
- todo: 'To-do',
- unread: 'Unread',
+ `未読のチャットや対応が必要なチャットだけを表示して、見落としを防ぎましょう。いつでも<a href="${priorityModePageUrl}">設定</a>から変更できます。`,
},
+ inboxTabs: {all: 'すべて', todo: 'To-do', unread: '未読'},
reportDetailsPage: {
inWorkspace: (policyName: string) => `${policyName} 内`,
generatingPDF: 'PDFを生成',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index c522b5421e4..d70faec9836 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -2883,15 +2883,11 @@ ${amount} voor ${merchant} - ${date}`,
},
},
focusModeUpdateModal: {
- title: 'Welkom bij de #focus-modus!',
+ title: 'Welkom bij de #focusmodus!',
prompt: (priorityModePageUrl: string) =>
- `Houd het overzicht door alleen ongelezen chats of chats die je aandacht nodig hebben te zien. Geen zorgen, je kunt dit op elk moment wijzigen in de <a href="${priorityModePageUrl}">instellingen</a>.`,
- },
- inboxTabs: {
- all: 'All',
- todo: 'To-do',
- unread: 'Unread',
+ `Blijf overal van op de hoogte door alleen ongelezen chats of chats te zien die je aandacht nodig hebben. Maak je geen zorgen, je kunt dit op elk moment wijzigen in de <a href="${priorityModePageUrl}">instellingen</a>.`,
},
+ inboxTabs: {all: 'Alles', todo: 'Takenlijst', unread: 'Ongelezen'},
reportDetailsPage: {
inWorkspace: (policyName: string) => `in ${policyName}`,
generatingPDF: 'PDF genereren',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 58a4b7b4975..20ca0fd2eaa 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -2877,15 +2877,11 @@ ${amount} dla ${merchant} - ${date}`,
},
},
focusModeUpdateModal: {
- title: 'Witamy w trybie #focus!',
+ title: 'Witaj w trybie #focus!',
prompt: (priorityModePageUrl: string) =>
- `Miej wszystko pod kontrolą, wyświetlając tylko nieprzeczytane czaty lub czaty wymagające Twojej uwagi. Nie martw się, możesz to zmienić w dowolnym momencie w <a href="${priorityModePageUrl}">ustawieniach</a>.`,
- },
- inboxTabs: {
- all: 'All',
- todo: 'To-do',
- unread: 'Unread',
+ `Miej wszystko pod kontrolą, wyświetlając tylko nieprzeczytane czaty lub czaty wymagające twojej uwagi. Nie martw się, możesz to zmienić w każdej chwili w <a href="${priorityModePageUrl}">ustawieniach</a>.`,
},
+ inboxTabs: {all: 'Wszystkie', todo: 'Do zrobienia', unread: 'Nieprzeczytane'},
reportDetailsPage: {
inWorkspace: (policyName: string) => `w ${policyName}`,
generatingPDF: 'Wygeneruj PDF',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 0de92a89420..7d501770b63 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -2879,13 +2879,9 @@ ${amount} para ${merchant} - ${date}`,
focusModeUpdateModal: {
title: 'Bem-vindo ao modo #focus!',
prompt: (priorityModePageUrl: string) =>
- `Mantenha tudo sob controle vendo apenas os chats não lidos ou que precisam da sua atenção. Não se preocupe, você pode alterar isso a qualquer momento em <a href="${priorityModePageUrl}">configurações</a>.`,
- },
- inboxTabs: {
- all: 'All',
- todo: 'To-do',
- unread: 'Unread',
+ `Fique por dentro de tudo vendo apenas os chats não lidos ou que precisam da sua atenção. Não se preocupe, você pode mudar isso a qualquer momento em <a href="${priorityModePageUrl}">configurações</a>.`,
},
+ inboxTabs: {all: 'Todos', todo: 'Tarefas', unread: 'Não lido'},
reportDetailsPage: {
inWorkspace: (policyName: string) => `em ${policyName}`,
generatingPDF: 'Gerar PDF',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index c0641efcf72..ea443502e46 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -2806,13 +2806,9 @@ ${amount},商户:${merchant} - 日期:${date}`,
},
focusModeUpdateModal: {
title: '欢迎进入 #focus 模式!',
- prompt: (priorityModePageUrl: string) => `通过仅查看未读聊天或需要你关注的聊天来随时掌握进展。别担心,你可以随时在<a href="${priorityModePageUrl}">设置</a>中更改此项。`,
- },
- inboxTabs: {
- all: 'All',
- todo: 'To-do',
- unread: 'Unread',
+ prompt: (priorityModePageUrl: string) => `通过只查看未读聊天或需要你处理的聊天,随时掌控一切。别担心,你可以随时在<a href="${priorityModePageUrl}">设置</a>中更改此选项。`,
},
+ inboxTabs: {all: '全部', todo: '待办事项', unread: '未读'},
reportDetailsPage: {
inWorkspace: (policyName: string) => `在 ${policyName} 中`,
generatingPDF: '生成 PDF',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
Contributor
|
🚧 @youssef-lr has triggered a test Expensify/App build. You can view the workflow run here. |
Contributor
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/640582
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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./** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari