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

Create the RequestCallPage #3697

Merged
merged 20 commits into from
Jun 23, 2021
Merged

Create the RequestCallPage #3697

merged 20 commits into from
Jun 23, 2021

Conversation

jasperhuangg
Copy link
Contributor

@jasperhuangg jasperhuangg commented Jun 21, 2021

Details

This PR creates the RequestCallPage and sets it up with react-navigation so that it can be accessed via navigating to <baseURL>/request-call. It also modifies the onPress handler for the call button in the Concierge DM to pull up the RequestCallPage.

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/167901
Fixes https://github.com/Expensify/Expensify/issues/167902

Tests

  1. Navigate to <baseURL>/request-call. Verify that the placeholder component displays.
  2. Navigate to your chat with Concierge. Click on the call button. Verify that the placeholder component displays.
  3. Set a display name and a secondary login in the settings. Verify that the form inputs are pre-filled correctly when you navigate to the request call page.
  4. Submit the form on the request call page with an empty first/last name. Verify a growl error appears.
  5. Submit the form on the request call page with an invalid phone number. Verify a growl error appears.
  6. Submit the form on the request call page with valid inputs. Verify a success growl appears. Then verify an Expensiworks/InboxCallUser job is queued up in Bedrock.

QA Steps

  1. Navigate to <baseURL>/request-call. Verify that the placeholder component displays.
  2. Navigate to your chat with Concierge. Click on the call button. Verify that the placeholder component displays.
  3. Set a display name and a secondary login in the settings. Verify that the form inputs are pre-filled correctly when you navigate to the request call page.
  4. Submit the form on the request call page with an empty first/last name. Verify a growl error appears.
  5. Submit the form on the request call page with an invalid phone number. Verify a growl error appears.
  6. Submit the form on the request call page with valid inputs. Verify a success growl appears. Then verify an Expensiworks/InboxCallUser job is queued up in BJM.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

iOS

ios.mp4

Web

web.mp4

Desktop

desktop.mp4

@jasperhuangg jasperhuangg self-assigned this Jun 21, 2021
@jasperhuangg jasperhuangg changed the title Create and set up the RequestCallPage with react-navigation Create the RequestCallPage Jun 22, 2021
@jasperhuangg jasperhuangg changed the title Create the RequestCallPage [HOLD Expensify.cash #3696] Create the RequestCallPage Jun 22, 2021
@jasperhuangg jasperhuangg marked this pull request as ready for review June 22, 2021 12:36
@jasperhuangg jasperhuangg requested a review from a team as a code owner June 22, 2021 12:36
@MelvinBot MelvinBot requested review from Dal-Papa and removed request for a team June 22, 2021 12:36
@jasperhuangg jasperhuangg changed the title [HOLD Expensify.cash #3696] Create the RequestCallPage Create the RequestCallPage Jun 23, 2021
@jasperhuangg
Copy link
Contributor Author

@Dal-Papa Just took this off hold, so we should be good for a review. Thanks!!

src/components/FullNameInputRow.js Outdated Show resolved Hide resolved
src/pages/RequestCallPage.js Outdated Show resolved Hide resolved
...withLocalizePropTypes,

/** The personal details of the person who is logged in */
myPersonalDetails: PropTypes.shape({

Choose a reason for hiding this comment

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

Not sure if that's relevant but maybe checkout @Jag96's code for displaying phone numbers if that's the primary displayName of the user :
#3728

*/
getPhoneNumber(loginList) {
const secondaryLogin = _.find(loginList, login => Str.isSMSLogin(login.partnerUserID));
return secondaryLogin ? Str.removeSMSDomain(secondaryLogin.partnerUserID) : null;

Choose a reason for hiding this comment

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

Maybe something to consolidate with Joe's code ?

Copy link
Contributor Author

@jasperhuangg jasperhuangg Jun 23, 2021

Choose a reason for hiding this comment

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

@Dal-Papa Joe's code assumes that the user is an SMS user, so it isn't entirely possible to reuse what he has. He assumes that the user's phone number is located somewhere in their personalDetails object, which isn't always the case for this particular page.

Copy link

@Dal-Papa Dal-Papa left a comment

Choose a reason for hiding this comment

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

Looks good. Re-arranging your screencasts just to label them and then merging.

@jasperhuangg
Copy link
Contributor Author

Thanks!! I figured they were already labeled in the title, but probably a good idea.

@Dal-Papa Dal-Papa merged commit f7dde80 into main Jun 23, 2021
@Dal-Papa Dal-Papa deleted the jasper-requestCallPageNavSetup branch June 23, 2021 12:02
@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 in version: 1.0.73-4🚀

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

@marcaaron marcaaron added the DeployBlockerCash This issue or pull request should block deployment label Jun 25, 2021
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.

Seems like there are some issues and this is breaking things for me on main

repro:

  1. Go to /settings
  2. Tap "Profile"
  3. 💥

Screen Shot 2021-06-25 at 10 25 21 AM

import styles from '../styles/styles';
import Text from './Text';
import themeColors from '../styles/themes/default';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
Copy link
Contributor

Choose a reason for hiding this comment

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

If you use JSX then React must be included

@@ -0,0 +1,171 @@
import {Component} from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

React must be included

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @marcaaron, sorry for the late reply! I noticed that this was broken and pushed a fix. It seems like it was broken when I merged a remote and local version of my branch.

@marcaaron
Copy link
Contributor

Sorry was on an older branch actually seems like maybe it was fixed.

@marcaaron marcaaron removed the DeployBlockerCash This issue or pull request should block deployment label Jun 25, 2021
@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@github-actions github-actions bot added the Hourly KSv2 label Jun 25, 2021
@jasperhuangg jasperhuangg removed the Hourly KSv2 label Jun 28, 2021
@OSBotify
Copy link
Contributor

🚀 Deployed to production in version: 1.0.74-0🚀

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants