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 Guides call request flow to workspace card configuration screen #4637

Merged
merged 14 commits into from
Aug 18, 2021

Conversation

alex-mechler
Copy link
Contributor

@alex-mechler alex-mechler commented Aug 13, 2021

cc @jasperhuangg

Details

This PR does two things

  1. Generalizes the ability to queue an inbox call, so that we can continue to use the same modal for different taskIDs
  2. Adds the call button to the Company Cards page of the workspace modal

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/173720#issuecomment-897795837

Tests

Regression Tests

  1. Navigate to your concierge DM
  2. Click the call button
  3. Verify it opens the request a call modal
  4. Fill out the form and submit it
  5. Verify you have a new Expensiworks/InboxCallUser job with the taskID ExpensifyCashConciergeDM in your jobs table
  6. Navigate to a non-concierge DM
  7. Click the call button
  8. Verify you are given the choice between Zoom and Google Meet

Feature Tests

  1. From the FAB, click the New Workspace button
  2. [mobile only] Click the Company Cards button
  3. Verify you see the call button
  4. [Web & Desktop only] Hover the call button, verify you see the tooltip
  5. Click the call button
  6. Verify it opens the inbox call dialog
  7. Fill out the form and submit it
  8. Verify you have a new Expensiworks/InboxCallUser job with the taskID WorkspaceCompanyCards in your jobs table

QA Steps

  1. From the FAB, click the New Workspace button
  2. [mobile only] Click the Company Cards button
  3. Verify you see the call button
  4. [Web & Desktop only] Hover the call button, verify you see the tooltip
  5. Click the call button
  6. Verify it opens the inbox call dialog

Repeat for each platform

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

image

Also tested the translation on web
image

Mobile Web

image

Desktop

image

iOS

image

Android

image

@alex-mechler alex-mechler self-assigned this Aug 13, 2021
@alex-mechler alex-mechler requested a review from a team as a code owner August 13, 2021 00:20
@MelvinBot MelvinBot requested review from chiragsalian and removed request for a team August 13, 2021 00:20
@alex-mechler alex-mechler changed the title Add Guides call request flow to workspace card configuration screen [HOLD] Add Guides call request flow to workspace card configuration screen Aug 13, 2021
@alex-mechler
Copy link
Contributor Author

@@ -32,6 +33,11 @@ const propTypes = {
/** Whether we should show a download button */
shouldShowDownloadButton: PropTypes.bool,

/** Whether weshould show a inbox call button */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/** Whether weshould show a inbox call button */
/** Whether we should show a inbox call button */

Copy link
Contributor

@jasperhuangg jasperhuangg left a comment

Choose a reason for hiding this comment

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

Lookin good! Some minor changes/concerns

@alex-mechler alex-mechler changed the title [HOLD] Add Guides call request flow to workspace card configuration screen Add Guides call request flow to workspace card configuration screen Aug 18, 2021
@alex-mechler
Copy link
Contributor Author

Off hold @chiragsalian @jasperhuangg

@@ -77,6 +86,11 @@ const HeaderWithCloseButton = props => (
)
}

{
props.shouldShowInboxCallButton && <InboxCallButton taskID={props.inboxCallTaskID} />

Copy link
Contributor

Choose a reason for hiding this comment

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

remove the unnecessary line break

src/components/VideoChatButtonAndMenu.js Show resolved Hide resolved
@@ -21,11 +21,13 @@ import ROUTES from '../ROUTES';
const propTypes = {
...withLocalizePropTypes,
...windowDimensionsPropTypes,
isConcierge: PropTypes.bool,
openInboxCall: PropTypes.bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

openInboxCall feels like an odd name for a boolean. I feel like this should start with is or should, maybe something like shouldOpenInboxCall or something. Either way, looking at the logic and now understanding it i felt like isConciergeChat is more obvious of a variable to understand whats going on i.e., if not concierge chat, open video menu, else if concierge chat open inbox call to schedule a setup call.

If you'd like to keep inboxCall then maybe add some comments explaining what happens if this variable is true or false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, before all the design changes, the new button also used this flow, so the variable name was changed. Since the design changes mean they are two different flows, I will change this back! Good catch

src/pages/RequestCallPage.js Show resolved Hide resolved
@@ -158,7 +158,7 @@ const HeaderView = (props) => {
{props.report.hasOutstandingIOU && (
<IOUBadge iouReportID={props.report.iouReportID} />
)}
<VideoChatButtonAndMenu isConcierge={isConcierge} />
<VideoChatButtonAndMenu openInboxCall={isConcierge} taskID="ExpensifyCashConciergeDM" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Thoughts on making the 2nd param consistent and more verbose i.e., instead of taskID calling it inboxCallTaskID.
Two reasons why I suggest this,

  1. taskID for VideoChatButtonAndMenu doesn't mean much imo so someone needs to look at the code to know what it is.
  2. Renaming to inboxCallTaskID would keep it consistent to the variable here.

@alex-mechler
Copy link
Contributor Author

Updated!

Copy link
Contributor

@chiragsalian chiragsalian left a comment

Choose a reason for hiding this comment

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

Small question. Rest LGTM

if (this.props.openInboxCall) {
Navigation.navigate(ROUTES.getRequestCallRoute(this.props.taskID));
if (this.props.isConcierge) {
Navigation.navigate(ROUTES.getRequestCallRoute('NewExpensifyConciergeDM'));
Copy link
Contributor

Choose a reason for hiding this comment

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

umm whats NewExpensifyConciergeDM? i don't see this on web-e master.
Don't you mean ExpensifyCashConciergeDM? Or is there a PR i'm unaware of that's updating this text?

Copy link
Contributor Author

@alex-mechler alex-mechler Aug 18, 2021

Choose a reason for hiding this comment

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

The taskID was updated in this PR #4408

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get it. But where is the new taskID defined in web-e. Like shouldn't web-E be aware of this taskID?
In web-E i see this which uses ExpensifyCashConciergeDM. So if we pass NewExpensifyConciergeDM then its treated as false here which feels incorrect. Thoughts? Am i missing something?

Copy link
Contributor Author

@alex-mechler alex-mechler Aug 18, 2021

Choose a reason for hiding this comment

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

No I don't think you are missing something, I think that was missed in the other updates PR. I'll spin up a separate PR for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

So does this PR now go on HOLD till the web-E code is on production or not really?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that since this is a n6 issue, we should avoid HOLDing this. We can CP the other PR to help with backwards compatability

Copy link
Contributor

@chiragsalian chiragsalian left a comment

Choose a reason for hiding this comment

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

LGTM

@jasperhuangg
Copy link
Contributor

Lookin good! Feel free to merge if the Web-E stuff with taskID is all good.

@alex-mechler
Copy link
Contributor Author

The task ID stuff has been merged and cp'd! Merging this! Thanks for the reviews yall!

@alex-mechler alex-mechler merged commit 0d263e5 into main Aug 18, 2021
@alex-mechler alex-mechler deleted the amechler-inbox-call-workspace branch August 18, 2021 23:30
@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.

@MitchExpensify
Copy link
Contributor

I presume an endless spinner is because this hasn't hit staging yet? (Although I was able to initiate the flow on staging)

image

@alex-mechler
Copy link
Contributor Author

This PR is on staging. Can you try the flow again, but have your JS console open so that I can see the error (if there is any)

@MitchExpensify
Copy link
Contributor

MitchExpensify commented Aug 26, 2021

It worked! @alex-mechler

@isagoico
Copy link

#4866 this issue was found while executing this PR

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @roryabraham in version: 1.0.88-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 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.

6 participants