-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[#Wave-Control: Add NetSuite]: Added NetSuite
connect button and fixed copies
#44218
[#Wave-Control: Add NetSuite]: Added NetSuite
connect button and fixed copies
#44218
Conversation
…v/App into mj-netsuite-token-input-auth
NetSuite
connect button and fixed bugsNetSuite
connect button and fixed copies
NetSuite
connect button and fixed copiesNetSuite
connect button and fixed copies
@ishpaul777 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] |
@ishpaul777 You can ignore this PR. @yuwenmemon @shubham1206agra The PR can be reviewed after we merge the subsidiary PR. I posted a message with a question here. @Expensify/design for the copy on the disconnect modals. |
Visually it looks good. Might lack context, but looping in @jamesdeanexpensify for copy check :) |
Chatting here! |
Here is where we landed:
|
@jamesdeanexpensify Can you also share the Spanish translation? |
|
NetSuite
connect button and fixed copiesNetSuite
connect button and fixed copies
@shubham1206agra @yuwenmemon @Expensify/design @jamesdeanexpensify This is ready for review. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeScreen.Recording.2024-06-28.at.12.10.43.AM.moviOS: NativeScreen.Recording.2024-06-28.at.12.30.55.AM.moviOS: mWeb SafariScreen.Recording.2024-06-28.at.12.08.05.AM.movMacOS: Chrome / SafariScreen.Recording.2024-06-28.at.12.06.44.AM.movMacOS: DesktopScreen.Recording.2024-06-28.at.12.13.09.AM.mov |
src/CONST.ts
Outdated
@@ -1794,6 +1794,11 @@ const CONST = { | |||
XERO: 'xero', | |||
NETSUITE: 'netsuite', | |||
}, | |||
NAME_MAP: { |
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.
NAME_MAP: { | |
NAME_USER_FRIENDLY: { |
This will match the constant names we use in the API and is also more intuitive.
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.
Okay updated.
src/languages/en.ts
Outdated
syncError: (integration?: ConnectionName): string => { | ||
switch (integration) { | ||
case CONST.POLICY.CONNECTIONS.NAME.QBO: | ||
return "Can't connect to QuickBooks Online."; | ||
case CONST.POLICY.CONNECTIONS.NAME.XERO: | ||
return "Can't connect to Xero."; | ||
case CONST.POLICY.CONNECTIONS.NAME.NETSUITE: | ||
return "Can't connec to NetSuite"; |
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.
return "Can't connec to NetSuite"; | |
return "Can't connect to NetSuite."; |
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.
Good eye!!
src/languages/en.ts
Outdated
const integrationName = integration && CONST.POLICY.CONNECTIONS.NAME_MAP[integration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integration] : 'integration'; | ||
return `Disconnect ${integrationName}`; |
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 this be simplified down to:
const integrationName = integration && CONST.POLICY.CONNECTIONS.NAME_MAP[integration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integration] : 'integration'; | |
return `Disconnect ${integrationName}`; | |
return `Disconnect ${CONST.POLICY.CONNECTIONS.NAME_MAP[integration] ?? 'integration'}`; |
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.
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 we just be strict with the types for the function?
disconnectPrompt: (currentIntegration: ConnectionName): string => `Are you sure you want to disconnect ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[currentIntegration] ?? 'integration'}?`},
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.
Good point, let me check if it has any other usage. I can update. Give me a few mins.
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 was able to update it for connectTitle
. For disconnectTitle
, it allows undefined.
Argument of type 'PolicyConnectionName | undefined' is not assignable to parameter of type 'keyof Connections'.\n Type 'undefined' is not assignable to type 'keyof Connections'.
src/languages/en.ts
Outdated
const integrationName = | ||
integrationToConnect && CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] : 'accounting integration'; | ||
return `Connect ${integrationName}`; | ||
}, |
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.
Same as above
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.
Responded. #44218 (comment)
src/languages/en.ts
Outdated
const integrationName = | ||
currentIntegration && CONST.POLICY.CONNECTIONS.NAME_MAP[currentIntegration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[currentIntegration] : 'this integration'; | ||
return `Are you sure you want to disconnect ${integrationName}?`; | ||
}, | ||
connectPrompt: (integrationToConnect?: ConnectionName): string => { | ||
const integrationName = | ||
integrationToConnect && CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] : 'this accounting integration'; | ||
return `Are you sure you want to connect ${integrationName}? This will remove any existing acounting connections.`; |
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.
Same as above
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.
Responded #44218 (comment).
src/languages/es.ts
Outdated
}, | ||
syncError: (integration?: ConnectionName): string => { | ||
switch (integration) { | ||
case CONST.POLICY.CONNECTIONS.NAME.QBO: | ||
return 'No se puede conectar a QuickBooks Online.'; | ||
case CONST.POLICY.CONNECTIONS.NAME.XERO: | ||
return 'No se puede conectar a Xero'; | ||
case CONST.POLICY.CONNECTIONS.NAME.NETSUITE: | ||
return 'No se puede conectar a NetSuite'; |
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.
return 'No se puede conectar a NetSuite'; | |
return 'No se puede conectar a NetSuite.'; |
Let's also add the punctuation for the Xero copy above.
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.
Added.
✋ 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 production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
Details
While adding the
ConnectToNetSuiteButton
component, I found several hardcoded copies for Xero and QBO. This could cause problems when we add NetSuite and other integrations. For instance, when connecting toXero
with existing NetSuite connection it would show:Are you sure you want to disconnect QuickBooks Online to set up Xero
.Hence to avoid clutter in the Token input PR, I created this PR to fix all copies and add the connect button for NetSuite.
Fixed Issues
$ #43434
PROPOSAL:
Pre-requisites:
NetSuite
beta enabled for the user. You can return true in the canUseNetSuiteIntegration method.connections: {netsuite: <linkedjson>}
, when we need to test disconnect NetSuite.Tests
title:
Disconnect {currentIntegrationName}
subtitle:
Are you sure you want to disconnect {currentIntegrationName}?
Connect
for any other integration, I'll takeXero
.title:
Connect [Accounting Integration]
subtitle:
Are you sure you want to connect to [Accounting Integration]? This will remove any existing accounting connections.
Offline tests
N/A
QA Steps
Same as Test 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
mweb-chrome-connect-content.mov
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web-connect-button-content.mov
MacOS: Desktop
desktop-connect-button-content.mov