Skip to content
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

Add get assistance page #6903

Merged
merged 46 commits into from
Jan 11, 2022
Merged

Add get assistance page #6903

merged 46 commits into from
Jan 11, 2022

Conversation

puneetlath
Copy link
Contributor

@puneetlath puneetlath commented Dec 25, 2021

Details

This PR adds a new Get Assistance page (shown below) which can be accessed by clicking the new question mark icon in the header of any page in the workspace settings. This page gives the option to chat with concierge or request a call with a guide. A summary of what was added/changed:

  1. Updated the header component to have the option to show the get assistance button (question mark)
  2. Updated every page of the workspace to show that button in its header
  3. Added a new get assistance page, which is accessed by clicking that question mark button
  4. Added constants for the various guides call Task IDs we'll associate with the guides call, depending on which page it is triggered from
  5. Added the functionality of storing a new key lastAccessedWorkspace in Onyx that is updated whenever a workspace is loaded (this is because there are scenarios where we can't get the workspace directly, context here)
  6. Removed the InboxCallButton component, which is no longer used anywhere in the workspace
  7. Updated the request a call page to navigate back to the previous page after a call is requested, instead of always navigating to the Concierge DM
  8. Updated the request a call page to use the lastAccessedWorkspace for the policy ID to associate with the guides job if it is available, otherwise fall back on the personal policy ID
  9. Refactored the WorkspaceSection component to be a more generic Section component that can be used outside the workspace
  10. Used that Section component on the new GetAssistance page and updated the RequestCall page to use it as well

Fixed Issues

$ #6719
$ https://github.com/Expensify/Expensify/issues/184190

Tests

  1. Click through every page of the workspace editor and make sure the question mark button is shown in the header.
  2. This includes every page of the bank account setup flow (info on how to test the bank setup flow here)
  3. Click that button on each page and make sure you are taken to the new Get Assistance page
  4. Make sure the task ID section of the URL makes sense given the page you clicked the button from. For example, if you click it from the travel page, you should see the URL as /get-assistance/WorkspaceBookTravel
  5. Make sure that closing the page closes the entire settings modal
  6. Make sure that the back button takes you back to the page you came from
  7. Make sure that clicking the chat with concierge option navigates you to your Concierge chat
  8. Make sure that clicking the request a setup call option takes you to the request a call page with the same task ID in the URL (i.e. /request-call/WorkspaceBookTravel)
  9. Make sure that you can request a call and that you are navigated back to the page you came from after doing so
  10. Check that the API call is using the proper policy ID and task ID in the Network tab

QA Steps

  1. Click through every page of the workspace editor and make sure the question mark button is shown in the header.
  2. This includes every page of the bank account setup flow
  3. Click that button on each page and make sure you are taken to the new Get Assistance page
  4. Make sure the task ID section of the URL (the last part) makes sense given the page you clicked the button from. For example, if you click it from the travel page, you should see the URL as /get-assistance/WorkspaceBookTravel
  5. Make sure that closing the page closes the entire settings modal
  6. Make sure that the back button takes you back to the page you came from
  7. Make sure that clicking the chat with concierge option navigates you to your Concierge chat
  8. Make sure that clicking the request a setup call option takes you to the request a call page with the same task ID in the URL (i.e. /request-call/WorkspaceBookTravel)
  9. Make sure that you can request a call and that you are navigated back to the page you came from after doing so
  10. Make sure you receive an sms saying "Thanks for requesting a call with our Expensify Guides".

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Screen Shot 2022-01-03 at 2 11 15 PM

Mobile Web

Desktop

Screen Shot 2022-01-03 at 3 28 42 PM

iOS

Screen Shot 2022-01-03 at 3 59 03 PM

Screen Shot 2022-01-03 at 3 59 05 PM

Android

Screen Shot 2022-01-03 at 2 35 48 PM

Screen Shot 2022-01-03 at 2 36 03 PM

@puneetlath puneetlath self-assigned this Jan 2, 2022
@puneetlath
Copy link
Contributor Author

Ok @Luke9389 @marcaaron I'm ready for another review. Main things that have been updated:

  1. I improved the way we were setting the policy ID for the call to be more straightforward
  2. I refactored the WorkspaceSection component to be a more generic Section component that can be used outside the workspace
  3. I used that Section component on the new GetAssistance page and updated the RequestCall page to use it as well

Copy link
Contributor

@marcaaron marcaaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Just have nabs and there is one missing doc for propTypes

src/components/Section.js Show resolved Hide resolved
src/pages/GetAssistancePage.js Outdated Show resolved Hide resolved
src/pages/GetAssistancePage.js Outdated Show resolved Hide resolved
src/pages/RequestCallPage.js Show resolved Hide resolved
Luke9389
Luke9389 previously approved these changes Jan 11, 2022
Copy link
Contributor

@Luke9389 Luke9389 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! All NABs from me too. Great job!

src/ONYXKEYS.js Outdated Show resolved Hide resolved
src/components/HeaderWithCloseButton.js Outdated Show resolved Hide resolved
src/pages/GetAssistancePage.js Outdated Show resolved Hide resolved
src/pages/RequestCallPage.js Outdated Show resolved Hide resolved
@puneetlath puneetlath requested a review from marcaaron January 11, 2022 01:26
@puneetlath
Copy link
Contributor Author

Thanks for the feedback y'all! @marcaaron I added the doc you requested if you can give another review.

@@ -69,12 +64,16 @@ const propTypes = {
requestCallForm: PropTypes.shape({
loading: PropTypes.bool,
}),

/** The policyID of the last workspace whose settings the user accessed */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcaaron the doc is here.

@marcaaron marcaaron merged commit 0d1ec3d into main Jan 11, 2022
@marcaaron marcaaron deleted the puneet-workspace-assistance branch January 11, 2022 15:59
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @marcaaron in version: 1.1.27-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @marcaaron in version: 1.1.27-3 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @marcaaron in version: 1.1.27-3 🚀

platform result
🤖 android 🤖 skipped 🚫
🖥 desktop 🖥 skipped 🚫
🍎 iOS 🍎 skipped 🚫
🕸 web 🕸 skipped 🚫

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Jag96 in version: 1.1.29-5 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants