-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Home Page] Time Sensitive - Add Card Setup Items #80975
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
[Home Page] Time Sensitive - Add Card Setup Items #80975
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 |
This comment has been minimized.
This comment has been minimized.
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.
|
🦜 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 bf7553fc..3fa3a417 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -2162,7 +2162,7 @@ const translations: TranslationDeepObject<typeof en> = {
addBankAccountToSendAndReceive: 'Fügen Sie ein Bankkonto hinzu, um Zahlungen zu senden oder zu empfangen.',
addDebitOrCreditCard: 'Debit- oder Kreditkarte hinzufügen',
assignedCards: 'Zugewiesene Karten',
- assignedCardsDescription: 'Dies sind Karten, die von einem Workspace-Admin vergeben wurden, um die Ausgaben des Unternehmens zu verwalten.',
+ assignedCardsDescription: 'Dies sind Karten, die von einem Workspace-Administrator zugewiesen wurden, um die Ausgaben des Unternehmens zu verwalten.',
expensifyCard: 'Expensify Card',
walletActivationPending: 'Wir überprüfen gerade Ihre Angaben. Bitte schauen Sie in ein paar Minuten noch einmal vorbei!',
walletActivationFailed: 'Leider kann deine Wallet derzeit nicht aktiviert werden. Bitte chatte mit Concierge, um weitere Unterstützung zu erhalten.',
@@ -8275,6 +8275,8 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
cta: 'Antrag',
offer50off: {title: 'Erhalte 50 % Rabatt auf dein erstes Jahr!', subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} verbleibend`},
offer25off: {title: 'Erhalten Sie 25 % Rabatt auf Ihr erstes Jahr!', subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'Tag' : 'Tage'} verbleiben`},
+ addShippingAddress: {title: 'Wir benötigen deine Versandadresse', subtitle: 'Gib eine Adresse an, um deine Expensify Card zu erhalten.', cta: 'Adresse hinzufügen'},
+ activateCard: {title: 'Aktiviere deine Expensify Card', subtitle: 'Validieren Sie Ihre Karte und beginnen Sie mit dem Ausgeben.', cta: 'Aktivieren'},
},
},
};
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index f1b52b56..ec3fbb51 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -2169,7 +2169,7 @@ const translations: TranslationDeepObject<typeof en> = {
addBankAccountToSendAndReceive: 'Ajoutez un compte bancaire pour effectuer ou recevoir des paiements.',
addDebitOrCreditCard: 'Ajouter une carte de débit ou de crédit',
assignedCards: 'Cartes assignées',
- assignedCardsDescription: 'Ce sont des cartes attribuées par un administrateur d’espace de travail pour gérer les dépenses de l’entreprise.',
+ assignedCardsDescription: 'Ces cartes sont attribuées par un administrateur d’espace de travail pour gérer les dépenses de l’entreprise.',
expensifyCard: 'Carte Expensify',
walletActivationPending: 'Nous examinons vos informations. Veuillez revenir dans quelques minutes !',
walletActivationFailed: 'Malheureusement, votre portefeuille ne peut pas être activé pour le moment. Veuillez discuter avec Concierge pour obtenir une assistance supplémentaire.',
@@ -8281,6 +8281,8 @@ Voici un *reçu test* pour vous montrer comment cela fonctionne :`,
cta: 'Demande',
offer50off: {title: 'Obtenez 50 % de réduction sur votre première année !', subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} restant`},
offer25off: {title: 'Obtenez 25 % de réduction sur votre première année !', subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'jour' : 'jours'} restants`},
+ addShippingAddress: {title: 'Nous avons besoin de votre adresse de livraison', subtitle: 'Indiquez une adresse pour recevoir votre carte Expensify.', cta: 'Ajouter une adresse'},
+ activateCard: {title: 'Activez votre carte Expensify', subtitle: 'Validez votre carte et commencez à dépenser.', cta: 'Activer'},
},
},
};
diff --git a/src/languages/it.ts b/src/languages/it.ts
index e239aa60..5270c050 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -8261,6 +8261,8 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
cta: 'Richiesta',
offer50off: {title: 'Ottieni il 50% di sconto sul tuo primo anno!', subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} rimanenti`},
offer25off: {title: 'Ottieni il 25% di sconto sul tuo primo anno!', subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'giorno' : 'giorni'} rimanenti`},
+ addShippingAddress: {title: 'Abbiamo bisogno del tuo indirizzo di spedizione', subtitle: 'Fornisci un indirizzo per ricevere la tua Expensify Card.', cta: 'Aggiungi indirizzo'},
+ activateCard: {title: 'Attiva la tua Expensify Card', subtitle: 'Convalida la tua carta e inizia a spendere.', cta: 'Attiva'},
},
},
};
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 8f7c9dbb..296a03dd 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -2154,7 +2154,7 @@ const translations: TranslationDeepObject<typeof en> = {
addBankAccountToSendAndReceive: '支払いや入金を行うために銀行口座を追加してください。',
addDebitOrCreditCard: 'デビットカードまたはクレジットカードを追加',
assignedCards: '割り当てられたカード',
- assignedCardsDescription: 'これらは、ワークスペース管理者が会社の支出を管理するために割り当てたカードです。',
+ assignedCardsDescription: 'これは、会社の支出を管理するためにワークスペース管理者によって割り当てられたカードです。',
expensifyCard: 'Expensify Card',
walletActivationPending: 'お客様の情報を確認しています。数分後にもう一度ご確認ください。',
walletActivationFailed: '残念ながら、現在はウォレットを有効にできません。詳しいサポートについては、Concierge にチャットでお問い合わせください。',
@@ -8173,6 +8173,8 @@ Expensify の使い方をお見せするための*テストレシート*がこ
cta: '申請',
offer50off: {title: '初年度が50%オフ!', subtitle: ({formattedTime}: {formattedTime: string}) => `残り${formattedTime}`},
offer25off: {title: '初年度が25%オフ!', subtitle: ({days}: {days: number}) => `残り ${days} ${days === 1 ? '日' : '日'}`},
+ addShippingAddress: {title: '配送先住所が必要です', subtitle: 'Expensify Card を受け取る住所を入力してください。', cta: '住所を追加'},
+ activateCard: {title: 'Expensifyカードを有効化', subtitle: 'カードを認証して、今すぐ支払いを始めましょう。', cta: '有効にする'},
},
},
};
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index c9bcb4a3..b9f7fc3a 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -8237,6 +8237,8 @@ Hier is een *testbon* om je te laten zien hoe het werkt:`,
cta: 'Declaratie',
offer50off: {title: 'Krijg 50% korting op je eerste jaar!', subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} resterend`},
offer25off: {title: 'Krijg 25% korting op je eerste jaar!', subtitle: ({days}: {days: number}) => `Nog ${days} ${days === 1 ? 'dag' : 'dagen'} resterend`},
+ addShippingAddress: {title: 'We hebben je verzendadres nodig', subtitle: 'Voer een adres in om uw Expensify Card te ontvangen.', cta: 'Adres toevoegen'},
+ activateCard: {title: 'Activeer je Expensify Card', subtitle: 'Valideer uw kaart en begin met uitgeven.', cta: 'Activeren'},
},
},
};
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index e34eb9a2..2e7e68b4 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -2156,7 +2156,7 @@ const translations: TranslationDeepObject<typeof en> = {
addBankAccountToSendAndReceive: 'Dodaj konto bankowe, aby wysyłać lub otrzymywać płatności.',
addDebitOrCreditCard: 'Dodaj kartę debetową lub kredytową',
assignedCards: 'Przypisane karty',
- assignedCardsDescription: 'To są karty przypisane przez administratora przestrzeni roboczej do zarządzania wydatkami firmowymi.',
+ assignedCardsDescription: 'Są to karty przypisane przez administratora przestrzeni roboczej w celu zarządzania wydatkami firmowymi.',
expensifyCard: 'Karta Expensify',
walletActivationPending: 'Przeglądamy Twoje informacje. Sprawdź ponownie za kilka minut!',
walletActivationFailed: 'Niestety Twojego portfela nie można teraz włączyć. Skontaktuj się z Concierge, aby uzyskać dalszą pomoc.',
@@ -8222,6 +8222,8 @@ Oto *paragon testowy*, który pokazuje, jak to działa:`,
cta: 'Roszczenie',
offer50off: {title: 'Uzyskaj 50% zniżki na pierwszy rok!', subtitle: ({formattedTime}: {formattedTime: string}) => `Pozostało: ${formattedTime}`},
offer25off: {title: 'Uzyskaj 25% zniżki na pierwszy rok!', subtitle: ({days}: {days: number}) => `Pozostało ${days} ${days === 1 ? 'dzień' : 'dni'}`},
+ addShippingAddress: {title: 'Potrzebujemy Twojego adresu wysyłki', subtitle: 'Podaj adres do otrzymania swojej karty Expensify.', cta: 'Dodaj adres'},
+ activateCard: {title: 'Aktywuj swoją kartę Expensify', subtitle: 'Zweryfikuj swoją kartę i zacznij wydawać.', cta: 'Aktywuj'},
},
},
};
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index e7e8885f..0108ceb0 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -2154,7 +2154,7 @@ const translations: TranslationDeepObject<typeof en> = {
addBankAccountToSendAndReceive: 'Adicione uma conta bancária para fazer ou receber pagamentos.',
addDebitOrCreditCard: 'Adicionar cartão de débito ou crédito',
assignedCards: 'Cartões atribuídos',
- assignedCardsDescription: 'Estes são cartões atribuídos por um administrador do workspace para gerenciar os gastos da empresa.',
+ assignedCardsDescription: 'Esses são cartões atribuídos por um administrador do workspace para gerenciar os gastos da empresa.',
expensifyCard: 'Cartão Expensify',
walletActivationPending: 'Estamos analisando suas informações. Volte daqui a alguns minutos!',
walletActivationFailed: 'Infelizmente, sua carteira não pode ser ativada neste momento. Converse com o Concierge para obter mais assistência.',
@@ -8231,6 +8231,8 @@ Aqui está um *recibo de teste* para mostrar como funciona:`,
cta: 'Solicitação',
offer50off: {title: 'Ganhe 50% de desconto no seu primeiro ano!', subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} restante`},
offer25off: {title: 'Ganhe 25% de desconto no seu primeiro ano!', subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'dia' : 'dias'} restantes`},
+ addShippingAddress: {title: 'Precisamos do seu endereço de entrega', subtitle: 'Forneça um endereço para receber seu Cartão Expensify.', cta: 'Adicionar endereço'},
+ activateCard: {title: 'Ativar seu Cartão Expensify', subtitle: 'Valide seu cartão e comece a gastar.', cta: 'Ativar'},
},
},
};
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index dec23951..46992be9 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -2127,7 +2127,7 @@ const translations: TranslationDeepObject<typeof en> = {
addBankAccountToSendAndReceive: '添加银行账户以进行或接收付款。',
addDebitOrCreditCard: '添加借记卡或信用卡',
assignedCards: '已分配的卡片',
- assignedCardsDescription: '这些是由工作区管理员分配的卡,用于管理员工支出。',
+ assignedCardsDescription: '这些是由工作区管理员分配的卡,用于管理公司支出。',
expensifyCard: 'Expensify Card',
walletActivationPending: '我们正在审核您的信息。请几分钟后再回来查看!',
walletActivationFailed: '很遗憾,您的钱包目前无法启用。请与 Concierge 聊天以获得更多帮助。',
@@ -7991,6 +7991,8 @@ ${reportName}
cta: '报销申请',
offer50off: {title: '首年立享五折优惠!', subtitle: ({formattedTime}: {formattedTime: string}) => `剩余 ${formattedTime}`},
offer25off: {title: '首次年度订阅立享 25% 折扣!', subtitle: ({days}: {days: number}) => `剩余 ${days} ${days === 1 ? '天' : '天'}`},
+ addShippingAddress: {title: '我们需要您的收货地址', subtitle: '请提供一个地址以接收您的 Expensify Card。', cta: '添加地址'},
+ activateCard: {title: '激活您的 Expensify 卡', subtitle: '验证您的银行卡并开始消费。', cta: '启用'},
},
},
};
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
a30efac to
5361d7e
Compare
|
@ZhenjaHorbach 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 |
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: 5361d7e41b
ℹ️ 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".
src/pages/home/TimeSensitiveSection/hooks/useTimeSensitiveCards.ts
Outdated
Show resolved
Hide resolved
src/pages/home/TimeSensitiveSection/hooks/useTimeSensitiveCards.ts
Outdated
Show resolved
Hide resolved
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: 5d48ae8e6b
ℹ️ 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".
src/pages/home/TimeSensitiveSection/hooks/useTimeSensitiveCards.ts
Outdated
Show resolved
Hide resolved
trjExpensify
left a comment
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.
Core PR for a WN project. 👍
src/pages/home/TimeSensitiveSection/hooks/useTimeSensitiveCards.ts
Outdated
Show resolved
Hide resolved
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari2026-01-30.14.07.40.mov |
|
Interesting 2026-01-30.14.08.15.mov |
src/pages/home/TimeSensitiveSection/items/AddShippingAddress.tsx
Outdated
Show resolved
Hide resolved
@mountiny? If so, can we do it as a follow up? It's related to the relations and default routes that @WojtekBoman mentioned yesterday. |
Agree that we can skip it for now |
|
@ZhenjaHorbach @adamgrzybowski I would say this is actually expected to take you to the wallet page instead of creating a new route and keeping you on the Home page |
|
@codex review |
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: f0493a6adf
ℹ️ 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".
| const cards = Object.values(cardList ?? {}); | ||
| const isPhysicalExpensifyCard = (card: Card) => card.bank === CONST.EXPENSIFY_CARD.BANK && !card.nameValuePairs?.isVirtual; |
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.
Guard against null entries in card list before access
If ONYXKEYS.CARD_LIST contains null placeholders (which happens when card entries are removed; several actions merge {[cardID]: null}), Object.values(cardList ?? {}) will include null and isPhysicalExpensifyCard will throw on card.bank. Other card-list utilities defend against this by filtering with isCard (see mergeCardListWithWorkspaceFeeds), so this hook can crash the home page for users who recently had cards removed. Consider filtering with isCard or using optional chaining before accessing card.bank/card.nameValuePairs.
Useful? React with 👍 / 👎.
|
@codex review |
|
|
||
| const {cardsNeedingShippingAddress, cardsNeedingActivation} = useMemo<{cardsNeedingShippingAddress: Card[]; cardsNeedingActivation: Card[]}>(() => { | ||
| const cards = Object.values(cardList ?? {}).filter(isCard); | ||
| const isPhysicalExpensifyCard = (card: Card) => card.bank === CONST.EXPENSIFY_CARD.BANK && !card.nameValuePairs?.isVirtual; |
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.
Minor issue
But insteadcard.bank === CONST.EXPENSIFY_CARD.BANK we can use isExpensifyCard utility
| import type {Card} from '@src/types/onyx'; | ||
|
|
||
| function useTimeSensitiveCards() { | ||
| const [cardList] = useOnyx(ONYXKEYS.CARD_LIST, {canBeMissing: true}); |
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.
I will refactor this to a selector
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.
Refactoring here #81058
| /** | ||
| * Filter to keep only personal cards from the card list. | ||
| * Personal cards have fundID === '0' or no fundID. | ||
| */ | ||
| const filterPersonalCards = (cards: OnyxEntry<CardList>): CardList => { | ||
| return filterObject(cards ?? {}, (key, card) => isPersonalCard(card)); | ||
| }; |
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.
gonna remove this in my PR
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.
Removing here #81058
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.11-16 🚀
|
Explanation of Change
Fixed Issues
$ #79991
PROPOSAL:
Tests
Test shipping the physical card
Prerequisite: Have workspace set up with Expensify Card
Adda shipping addressAddbuttonINTERNAL QA Test activating the physical card
Prerequisite: Have workspace set up with Expensify Card
Activatethe cardActivatebuttonOffline tests
N/A
QA Steps
Must be internalQA
Same as tests
// TODO: These must be filled out, or the issue title must include "[No QA]."
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