-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[QBO Export] feat: handling auto-sync errors #45251
[QBO Export] feat: handling auto-sync errors #45251
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 |
I noticed this while testing as well. There's a delay between IS pushing the last progress update and the final update that sets
I think this should've been fixed by #45762. That's still not the case? cc @zfurtak
Is this not an issue on other platforms? I'm actually not sure if the sync should automatically restart after reconnecting. |
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… |
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.
Let's remove these console log 😄
); | ||
|
||
const renderActiveIntegration = () => { | ||
console.log('rerender'); |
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.
console.log('rerender'); |
|
||
const renderActiveIntegration = () => { | ||
console.log('rerender'); | ||
console.log('activeIntegration', activeIntegration); |
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.
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
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 🚀
|
Details
This PR adds:
To enter the credentials I also refactor the integration buttons:
ConnectToSageIntacctButton
->ConnectToSageIntacctFlow
,AccountingContext
is added to run the integration flows centrally,AccountingConnectionConfirmationModal
is 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.ts
by settingsUSE_REACT_STRICT_MODE
tofalse
.Prerequisites
Steps
Change integration
Other integrations
.Confirm
.Verify new integration connection
All
Connect
buttons and integration flows were refactored. Verify that it is possible to add each integration:canUseNetSuiteIntegration
to true),canUseSageIntacctIntegration
to true).Verify reusing connections
Do the steps from this PR
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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
Connect
buttons:Screen.Recording.2024-07-15.at.16.26.58.mov
MacOS: Desktop
desktop.mov