[QBO Export] feat: handling auto-sync errors#45251
[QBO Export] feat: handling auto-sync errors#45251arosiclair merged 52 commits intoExpensify:mainfrom
Conversation
8ba55ba to
5ba1348
Compare
5ba1348 to
43e5fe1
Compare
6ade96e to
1c7f281
Compare
|
@ishpaul777 @arosiclair One of you needs to 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] |
|
On mWeb iOS opening reconnecting the integration might not work yet, there will be a separate issue. More details. |
|
@hungvu193 can you take the review of this one with the context on the project? Thanks! |
|
Sure thing. Please assign me to this PR. Thank you |
|
Please remove my assignment once @hungvu193 is assiged, Thanks! |
|
I got this issue while testing and it worked after I refreshed the page few times. Screen.Recording.2024-07-16.at.14.51.29.mov |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-13.at.22.57.46.movAndroid: mWeb ChromeScreen.Recording.2024-08-13.at.11.05.36.moviOS: NativeScreen.Recording.2024-08-13.at.22.24.53.moviOS: mWeb Safarisafari.movMacOS: Chrome / SafariScreen.Recording.2024-08-13.at.09.45.54.movMacOS: DesktopUploading Screen Recording 2024-08-13 at 22.46.00.mov… |
hungvu193
left a comment
There was a problem hiding this comment.
Let's remove these console log 😄
| ); | ||
|
|
||
| const renderActiveIntegration = () => { | ||
| console.log('rerender'); |
There was a problem hiding this comment.
| console.log('rerender'); |
|
|
||
| const renderActiveIntegration = () => { | ||
| console.log('rerender'); | ||
| console.log('activeIntegration', activeIntegration); |
There was a problem hiding this comment.
| console.log('activeIntegration', activeIntegration); |
After re-enter credentials successfully, if I click on Screen.Recording.2024-08-13.at.22.46.00.mov |
I don't think you should expect any progress updates while logging into QBO if that's what you mean. Progress should start after you logged into QBO successfully. Either way, the progress updates are separate from the error handling we're focusing on so let's treat that as a separate issue. |
|
I see. Then I think there's only linting left and it will be ready for your final review. |
|
@hungvu193 Logs removed! Sorry for that 😅 |
…rors # Conflicts: # src/components/ConnectToQuickbooksOnlineButton/index.native.tsx # src/components/ConnectToQuickbooksOnlineButton/index.tsx
arosiclair
left a comment
There was a problem hiding this comment.
Looks pretty good overall just a few questions
| }; | ||
|
|
||
| function AccountingContextProvider({children, policy}: AccountingContextProviderProps) { | ||
| const integrationRefs = useRef<Record<string, MutableRefObject<View | null>>>(defaultAccountingContext.integrationRefs.current); |
There was a problem hiding this comment.
Can you help me understand how we're using integrationRefs? I see it initialized with integrationRefsInitialValue but I don't see where it's updated.
There was a problem hiding this comment.
We're changing integration refs in PolicyAccountingPage to pass the position of the threeDotsMenuContainer button to be able to show modal in the correct place
There was a problem hiding this comment.
Oh okay I see the name changed to integrationsRef in that file. Lets rename that to popoverAnchorRefs to be a bit more clear. And let's keep the naming consistent in every file.
| }; | ||
|
|
||
| function AccountingContextProvider({children, policy}: AccountingContextProviderProps) { | ||
| const integrationRefs = useRef<Record<string, MutableRefObject<View | null>>>(defaultAccountingContext.integrationRefs.current); |
There was a problem hiding this comment.
Oh okay I see the name changed to integrationsRef in that file. Lets rename that to popoverAnchorRefs to be a bit more clear. And let's keep the naming consistent in every file.
…rors # Conflicts: # src/pages/workspace/accounting/PolicyAccountingPage.tsx
|
@arosiclair Comment addressed and conflicts resolved 🫡 |
|
@arosiclair Are we ready for the merge? Or is there something I need to do here? 🤔 |
|
Nope just got distracted 😄 |
|
✋ 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/arosiclair in version: 9.0.23-0 🚀
|
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.0.23-0 🚀
|
| onImportPagePress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_IMPORT.getRoute(policyID)), | ||
| onExportPagePress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT.getRoute(policyID)), | ||
| onCardReconciliationPagePress: () => Navigation.navigate(ROUTES.WORKSPACE_ACCOUNTING_CARD_RECONCILIATION.getRoute(policyID, CONST.POLICY.CONNECTIONS.ROUTE.QBO)), | ||
| onAdvancedPagePress: () => Navigation.navigate(ROUTES.WORKSPACE_ACCOUNTING_QUICKBOOKS_ONLINE_ADVANCED.getRoute(policyID)), |
There was a problem hiding this comment.
We missed adding pending fields over here, which caused #57670
Details
This PR adds:
To enter the credentials I also refactor the integration buttons:
ConnectToSageIntacctButton->ConnectToSageIntacctFlow,AccountingContextis added to run the integration flows centrally,AccountingConnectionConfirmationModalis now displayed in the context.Reconnecting on mWeb iOS might not work due to this bug.
Fixed Issues
$ #44016
PROPOSAL: N/A
Tests
Note
The modal animation doesn't work on the Dev environment with Strict Mode. Disable it in
CONFIG.tsby settingsUSE_REACT_STRICT_MODEtofalse.Prerequisites
Steps
Change integration
Other integrations.Confirm.Verify new integration connection
All
Connectbuttons and integration flows were refactored. Verify that it is possible to add each integration:canUseNetSuiteIntegrationto true),canUseSageIntacctIntegrationto true).Verify reusing connections
Do the steps from this PR
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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-native.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
Xero:
web.mov
All
Connectbuttons:Screen.Recording.2024-07-15.at.16.26.58.mov
MacOS: Desktop
desktop.mov