[Home page] [Release 4] Adding time sensitive actions for broken connections#80974
[Home page] [Release 4] Adding time sensitive actions for broken connections#80974
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
This comment has been minimized.
This comment has been minimized.
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
|
||
| function FixAccountingConnection({connectionName, policyID}: FixAccountingConnectionProps) { | ||
| const {translate} = useLocalize(); | ||
| const icons = useMemoizedLazyExpensifyIcons(['Exclamation'] as const); |
There was a problem hiding this comment.
I suppose it should work without as const
|
|
||
| function FixCompanyCardConnection({card, policyID}: FixCompanyCardConnectionProps) { | ||
| const {translate} = useLocalize(); | ||
| const icons = useMemoizedLazyExpensifyIcons(['Connect'] as const); |
There was a problem hiding this comment.
It should work without as const
This comment has been minimized.
This comment has been minimized.
| if (!shouldShowDiscount || !discountInfo) { | ||
| return null; | ||
| // Determine which offer to show based on discount type (they are mutually exclusive) | ||
| const shouldShow50off = shouldShowDiscount && discountInfo?.discountType === 50; |
There was a problem hiding this comment.
It's better to wait until we merge this PR
And then use useTimeSensitiveOffers here
This comment has been minimized.
This comment has been minimized.
src/pages/home/TimeSensitiveSection/items/FixAccountingConnection.tsx
Outdated
Show resolved
Hide resolved
|
I will clean this one up tomorrow |
🦜 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 787f3d3e..3335a4d8 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -1003,6 +1003,12 @@ const translations: TranslationDeepObject<typeof en> = {
subtitle: 'Validieren Sie Ihre Karte und beginnen Sie mit dem Ausgeben.',
cta: 'Aktivieren',
},
+ ctaFix: 'Beheben',
+ fixCompanyCardConnection: {
+ title: ({feedName}: {feedName: string}) => (feedName ? `${feedName}-Firmenkartenverbindung reparieren` : 'Firmenkarte reparieren Verbindung der Firmenkarte reparieren'),
+ subtitle: 'Workspace > Unternehmenskarten',
+ },
+ fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `${integrationName}-Verbindung reparieren`, subtitle: 'Arbeitsbereich > Buchhaltung'},
},
announcements: 'Ankündigungen',
discoverSection: {
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index b172705b..a3e49b9e 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1007,6 +1007,12 @@ const translations: TranslationDeepObject<typeof en> = {
subtitle: 'Validez votre carte et commencez à dépenser.',
cta: 'Activer',
},
+ ctaFix: 'Corriger',
+ fixCompanyCardConnection: {
+ title: ({feedName}: {feedName: string}) => (feedName ? `Corriger la connexion de la carte d'entreprise ${feedName}` : 'Corriger la connexion de la carte entreprise'),
+ subtitle: 'Espace de travail > Cartes d’entreprise',
+ },
+ fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Corriger la connexion ${integrationName}`, subtitle: 'Espace de travail > Comptabilité'},
},
announcements: 'Annonces',
discoverSection: {
diff --git a/src/languages/it.ts b/src/languages/it.ts
index a2500c32..34345038 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -1002,6 +1002,12 @@ const translations: TranslationDeepObject<typeof en> = {
subtitle: 'Convalida la tua carta e inizia a spendere.',
cta: 'Attiva',
},
+ ctaFix: 'Correggi',
+ fixCompanyCardConnection: {
+ title: ({feedName}: {feedName: string}) => (feedName ? `Correggi la connessione della carta aziendale ${feedName}` : 'Correggi connessione carta aziendale'),
+ subtitle: 'Spazio di lavoro > Carte aziendali',
+ },
+ fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Correggi connessione ${integrationName}`, subtitle: 'Spazio di lavoro > Contabilità'},
},
announcements: 'Annunci',
discoverSection: {
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 5aae4900..fdde2c04 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -998,6 +998,12 @@ const translations: TranslationDeepObject<typeof en> = {
subtitle: 'カードを認証して支出を始めましょう。',
cta: '有効化',
},
+ ctaFix: '修正',
+ fixCompanyCardConnection: {
+ title: ({feedName}: {feedName: string}) => (feedName ? `${feedName} 会社カード接続を修正` : '法人クレジットカードの接続を修正'),
+ subtitle: 'ワークスペース > 会社カード',
+ },
+ fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `${integrationName} 接続を修正`, subtitle: 'ワークスペース > 会計'},
},
announcements: 'お知らせ',
discoverSection: {
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 428e4147..689897ce 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1002,6 +1002,12 @@ const translations: TranslationDeepObject<typeof en> = {
subtitle: 'Valideer je kaart en begin met uitgeven.',
cta: 'Activeren',
},
+ ctaFix: 'Repareren',
+ fixCompanyCardConnection: {
+ title: ({feedName}: {feedName: string}) => (feedName ? `Verbinding bedrijfskaart ${feedName} herstellen` : 'Verbinding van bedrijfskaart repareren'),
+ subtitle: 'Werkruimte > Bedrijfspassen',
+ },
+ fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Verbinding met ${integrationName} repareren`, subtitle: 'Werkruimte > Boekhouding'},
},
announcements: 'Aankondigingen',
discoverSection: {
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index c32c6bfb..90e2f135 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -1003,6 +1003,12 @@ const translations: TranslationDeepObject<typeof en> = {
subtitle: 'Zatwierdź swoją kartę i zacznij wydawać.',
cta: 'Aktywuj',
},
+ ctaFix: 'Napraw',
+ fixCompanyCardConnection: {
+ title: ({feedName}: {feedName: string}) => (feedName ? `Napraw połączenie karty firmowej ${feedName}` : 'Napraw połączenie karty firmowej'),
+ subtitle: 'Workspace > Karty firmowe',
+ },
+ fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Napraw połączenie ${integrationName}`, subtitle: 'Przestrzeń robocza > Księgowość'},
},
announcements: 'Ogłoszenia',
discoverSection: {
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 8247dec9..c2d534ce 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -1001,6 +1001,12 @@ const translations: TranslationDeepObject<typeof en> = {
subtitle: 'Valide seu cartão e comece a gastar.',
cta: 'Ativar',
},
+ ctaFix: 'Corrigir',
+ fixCompanyCardConnection: {
+ title: ({feedName}: {feedName: string}) => (feedName ? `Corrigir conexão do cartão corporativo ${feedName}` : 'Corrigir conexão do cartão corporativo'),
+ subtitle: 'Área de trabalho > Cartões corporativos',
+ },
+ fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Corrigir conexão com ${integrationName}`, subtitle: 'Espaço de trabalho > Contabilidade'},
},
announcements: 'Comunicados',
discoverSection: {
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index c01f95fd..a606697c 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -988,6 +988,9 @@ const translations: TranslationDeepObject<typeof en> = {
subtitle: '验证您的银行卡并开始消费。',
cta: '启用',
},
+ ctaFix: '修复',
+ fixCompanyCardConnection: {title: ({feedName}: {feedName: string}) => (feedName ? `修复 ${feedName} 公司卡连接` : '修复公司卡连接'), subtitle: '工作区 > 公司卡片'},
+ fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `修复 ${integrationName} 连接`, subtitle: '工作区 > 会计'},
},
announcements: '公告',
discoverSection: {
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
Add buttonProps={{success: true}} to BaseWidgetItem in ForYouSection
to make the CTA buttons green, consistent with the TimeSensitiveSection
styling approach.
|
@grgia shoul dbe ready |
|
🚧 @grgia 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! 🧪🧪
|
|
🚧 @grgia 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/grgia in version: 9.3.13-1 🚀
|
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.3.15-0 🚀
|
I am not sure how QA can do that, maybe we could do InternalQA here @joekaufmanexpensify |
|
@mountiny We tested the broken accounting integration, and it passed. |
|
Tested broken card connection, error looks good on home and confirmed the |
|
checked it off on QA 👍 |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.15-10 🚀
|
Explanation of Change
This PR implements Release 4 of the NewDot Home page Time Sensitive section, adding two new widgets:
Key changes:
Priority order (from design doc):
Fixed Issues
$ #79970
PROPOSAL:
Tests
Prerequisite: Have a workspace with accounting integration set up
Offline tests
N/A
QA Steps
// 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./** 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