-
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
Xero authentication flow #40277
Xero authentication flow #40277
Conversation
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.
Add also ES translations
src/components/ConnectToQuickbooksOnlineButton/index.native.tsx
Outdated
Show resolved
Hide resolved
const {title, icon, setupConnectionButton} = accountingIntegrationData(integration, policyID, translate, styles); | ||
return { | ||
icon, | ||
iconType: 'avatar', |
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.
use CONST.ICON_TYPE_AVATAR
bump @mollfpr 😃 |
|
||
const getXeroSetupLink = (policyID: string) => { | ||
const params = new URLSearchParams({policyID}); | ||
const commandURL = getCommandURL({command: 'ConnectPolicyToXero', shouldSkipWebProxy: 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.
is it the final version and we are sure we want to skip web proxy? 😄
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.
Right now proxy causes 407 Proxy Authentication Required error. When we adjust backend to work with proxy then we can remove this, but let's not allow this to block us
I'll be back on the review here in an hour. |
Yes
Yes same. |
A PR to fix the sync progress not being displayed is under review, and will be merged as soon as possible. |
@cdOut you'll need to update the translations with this copy: English:
Spanish:
English:
Spanish:
|
@mananjadhav I've pushed fixes to the recently added suggestions and also updated the translations. PR should be ready to be re-tested, let me know if I've missed any issues. |
Overall the auth change works, but disconnect doesn't.
Screen.Recording.2024-04-29.at.11.57.57.PM.mov |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-xero-authentication_J1ZqJV0D.mp4Android: mWeb Chromemweb-chrome-xero-authentication.moviOS: NativeiOS: mWeb Safarimweb-safari-xero-authentication.movMacOS: Chrome / Safariweb-xero-authentication.movMacOS: Desktopdesktop-xero-authentication.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.
@mananjadhav Thanks! I think we can go ahead with this now and we can fix the Xero disconnect issue as a quick follow up. Getting this to staging will help us get more testing on this flow
Thank you for this recap on what needs to be fixed. Regarding Concerning the loading states, we should have them, it'll be fixed when the PR to fix push notifications will be merged. For the reasons mentioned above by @mountiny, I'm going to proceed with the merge so we can identify and fix as soon as possible eventual new issues that'll arise on staging. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 1.4.67-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to staging by https://github.com/lakchote in version: 1.4.68-0 🚀
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 1.4.67-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.68-3 🚀
|
setIsDisconnectModalOpen(true); | ||
return; | ||
} | ||
setWebViewOpen(true); | ||
}} | ||
text={translate('workspace.accounting.setup')} | ||
style={styles.justifyContentCenter} |
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 deleted this style caused a regression here
onClose={() => setWebViewOpen(false)} | ||
fullscreen | ||
isVisible={isWebViewOpen} | ||
type={CONST.MODAL.MODAL_TYPE.CENTERED} |
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.
This modal type has a bug for android. More details here: #40978 (comment)
Details
This PR is part of the Xero integration project where we supports integration with Xero, an accounting software, on New Expensify.
This PR adds a button that the user can click to start the authentication flow with the Xero, similarily to QBO authentication flow. On both web and native platforms, this button opens up a new web page where the user can authenticate with the Xero. After the authentication is complete, the user's authentication token is stored in the backend and the web page closes.
On a web browser, the web page is opened on a separate browser window. On iOS and Android, a temporary browser window is opened as a modal within the app to display the web page.
This PR also adds support to 'Other integrations' section on PolicyAccountingPage. When one of accounting integration is successfully connected, then the rest of integrations is put into 'Other integrations' section.
Fixed Issues
$ #39725
$ #39955
PROPOSAL:
Tests
To test this you need to add .env file in root of the project with following content
ENVIRONMENT=staging
Offline tests
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop