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

[HOLD for payment 2023-07-17] [$1000] Add Workspace member "Invitation message" page appears when accessing via deeplink #21412

Closed
6 tasks done
kavimuru opened this issue Jun 23, 2023 · 50 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Jun 23, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the app
  2. Open settings
  3. Open workspaces
  4. Open any workspace
  5. Open members
  6. Click on invite
  7. Select any user and click next
  8. Copy the URL and click on invite
  9. Revisite the copied URL and observe that even though no users are selected, we can open invite message page

Expected Result:

App should not allow to open invite message page for workspace without selecting any user to invite.
Suggestion is to display not allowed page if tried to access by deep link

Actual Result:

App allows to open invite message page for workspace without any selected user using deep link

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.31-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

allows.invite.message.without.user.selection.mp4
Recording.1082.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686996147729769

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ed01d5cf4602a878
  • Upwork Job ID: 1673409677692813312
  • Last Price Increase: 2023-07-03
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@hungvu193
Copy link
Contributor

hungvu193 commented Jun 23, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Invite message page appears when accessing with deeplink without any member selected

What is the root cause of that problem?

In our WorkspaceInviteMessagePage, we are having this condition to show NotFound page.

                <FullPageNotFoundView
                    shouldShow={_.isEmpty(this.props.policy)}
                    onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)}
                >

In this case, it's not enough because even when there's no selected member, we still see the page without any NotFound view.

What changes do you think we should make in order to solve the problem?

We should update the shouldShow condition to this, so when there's no selected member, it will display NotFound view.

                <FullPageNotFoundView
                    shouldShow={_.isEmpty(this.props.policy) || _.isEmpty(this.props.invitedEmailsToAccountIDsDraft)}
                    onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)}
                >

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 23, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Invite message page for adding new workspace members is accessible with deeplink without having any selected members.
Due to this user lands on the incomplete screen and sees the invite message textinput and the error Please select at least one member to invite.

What is the root cause of that problem?

We are not validating invitedEmailsToAccountIDsDraft array here(in WorkspaceInviteMessagePage) whether it is empty or not.

componentDidMount() {
this.focusWelcomeMessageInput();
}

What changes do you think we should make in order to solve the problem?

We first need to validate invitedEmailsToAccountIDsDraft and if it is empty we should navigate the user to the invite page.

        if(_.isEmpty(this.props.invitedEmailsToAccountIDsDraft)) {
            Navigation.navigate(ROUTES.getWorkspaceInviteRoute(this.props.route.params.policyID));
        }

With this, we need to update the navigation function call for the back button from goBack to navigate of this flow to not take the user to invite-message page on the back button click.

Navigation.goBack(ROUTES.getWorkspaceMembersRoute(this.props.route.params.policyID));

Navigation.goBack(ROUTES.getWorkspaceInitialRoute(policyID));

Result
Screen.Recording.2023-06-23.at.10.03.16.PM.mp4

What alternative solutions did you explore? (Optional)

We can show the customized NotFound View by passing the relative key strings() to FullPageNotFoundView.

             <FullPageNotFoundView
                    shouldShow={_.isEmpty(this.props.policy) || _.isEmpty(this.props.invitedEmailsToAccountIDsDraft)}
                    onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)}
                    titleKey="workspace.inviteMessage.notHereTitle"
                    subtitleKey="workspace.inviteMessage.notHereSubTitle"
                    shouldShowLink
                    linkKey="workspace.inviteMessage.goToInvite"
                    onLinkPress={() => Navigation.navigate(ROUTES.getWorkspaceInviteRoute(this.props.route.params.policyID))}
                >
Result
Screen.Recording.2023-06-23.at.10.28.54.PM.mov

@melvin-bot melvin-bot bot added the Overdue label Jun 26, 2023
@mallenexpensify mallenexpensify added the External Added to denote the issue can be worked on by a contributor label Jun 26, 2023
@melvin-bot melvin-bot bot changed the title Invite message page appears when accessing with deeplink without any member selected [$1000] Invite message page appears when accessing with deeplink without any member selected Jun 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01ed01d5cf4602a878

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

Current assignee @mallenexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Jun 26, 2023

Grumble, I started working on this on Friday and lost the data in the compose box.
I'm unsure if it's a bug, in the sense that https://staging.new.expensify.com/workspace/68E5D1CC5AF51921/invite takes you to the invite modal and https://staging.new.expensify.com/workspace/68E5D1CC5AF51921/invite-message takes you to the 'invite message' modal, so the links are working as they're supposed to. It's the flow that's inaccurate. So.. we can

  1. Do nothing since the chance of someone randomly copy/pasting/sending/open the /invite-message link won't be common.
  2. Redirect from /invite-message to another page (/invite makes sense to me) if a user isn't already selected. cc @Pujan92
  3. Show the NotFound page cc @hungvu193
  4. Something else.

I'm leaning towards # 2, what do you think @s77rt ?

@melvin-bot melvin-bot bot removed the Overdue label Jun 26, 2023
@s77rt
Copy link
Contributor

s77rt commented Jun 26, 2023

@hungvu193 Thanks for the proposal. This is more like a feature request. You RCA makes sense and so is the fix but I don't think we should show the not found view because the page exists.

@s77rt
Copy link
Contributor

s77rt commented Jun 26, 2023

@Pujan92 Thanks for the proposal. Same note as above, since this is a feature request (kinda) your RCA is also correct. The solution looks good to me, just instead of replacing goBack with navigate let's just set shouldEnforceFallback to true i.e. goBack(page, true);

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

Triggered auto assignment to @marcaaron, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@s77rt
Copy link
Contributor

s77rt commented Jun 26, 2023

@mallenexpensify Thanks for the summary. I like option 2 as well since we follow the same approach in IOU flow, option 1 is okay but this is easy to fix so let's fix it. I have approved the proposal from @Pujan92. Waiting for @marcaaron review now.

@hungvu193
Copy link
Contributor

@hungvu193 Thanks for the proposal. This is more like a feature request. You RCA makes sense and so is the fix but I don't think we should show the not found view because the page exists.

Actually we will show NotFound
Page when policy is empty, so why don't we show NotFound page in this case?

@s77rt
Copy link
Contributor

s77rt commented Jun 27, 2023

@hungvu193 I think the policy object being empty means that the policy does not exist (it was removed). So the not found view here makes sense.

@hungvu193
Copy link
Contributor

@hungvu193 I think the policy object being empty means that the policy does not exist (it was removed). So the not found view here makes sense.

So how about disable the button when no member is selected, I don't think we should navigate them back.

@s77rt
Copy link
Contributor

s77rt commented Jun 27, 2023

@hungvu193 Disabling the button will provide no context or feedback on why it's disabled.

@marcaaron
Copy link
Contributor

marcaaron commented Jun 27, 2023

Invite message page appears when accessing with deeplink without any member selected

@Pujan92 or @s77rt Please kindly update the proposal with a clear summary of the problem.

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 27, 2023

Invite message page appears when accessing with deeplink without any member selected

@Pujan92 or @s77rt Please kindly update the proposal with a clear summary of the problem.

@marcaaron Updated.

@melvin-bot melvin-bot bot added the Overdue label Jun 30, 2023
@Pujan92
Copy link
Contributor

Pujan92 commented Aug 4, 2023

Bump @mallenexpensify for payment, created upwork job got expired and I forgot to apply earlier.

@melvin-bot melvin-bot bot added the Overdue label Aug 14, 2023
@marcaaron
Copy link
Contributor

I think we are just still waiting for payment here.

@melvin-bot melvin-bot bot removed the Overdue label Aug 15, 2023
@melvin-bot melvin-bot bot added the Overdue label Aug 23, 2023
@mallenexpensify
Copy link
Contributor

Apologies for the (longest) delay (ever)
@Pujan92 and @s77rt , can you please accept the job and reply here once you have?
https://www.upwork.com/jobs/~01ecfb317e2597f4f5

@melvin-bot melvin-bot bot removed the Overdue label Aug 23, 2023
@mallenexpensify mallenexpensify added Daily KSv2 and removed Weekly KSv2 labels Aug 23, 2023
@Pujan92
Copy link
Contributor

Pujan92 commented Aug 23, 2023

No issues @mallenexpensify , Accepted!

@s77rt
Copy link
Contributor

s77rt commented Aug 23, 2023

@mallenexpensify Accepted! Thanks!

@dhanashree-sawant
Copy link

Hi @mallenexpensify, can you also comment once on #19073 so my payment can be handled there?

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

@Pujan92, @s77rt, @mallenexpensify, @marcaaron Eep! 4 days overdue now. Issues have feelings too...

@marcaaron
Copy link
Contributor

Assuming there is nothing left to do for this one. Feel free to reopen if that is not the case.

@melvin-bot melvin-bot bot removed the Overdue label Aug 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@Pujan92
Copy link
Contributor

Pujan92 commented Oct 26, 2023

@mallenexpensify payment seems to be pending here, offers are accepted earlier. cc: @s77rt
https://www.upwork.com/nx/wm/workroom/34612179

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Oct 27, 2023

Issue reporter: @dhanashree-sawant paid $250 via Upwork
Contributor: @Pujan92 paid $1500 via Upwork, inc. urgency bonus
Contributor+: @s77rt paid $1500 via Upwork, inc. urgency bonus

@dhanashree-sawant , since the job was closed, the offer I sent to you doesn't show as a normal link on my end. You can find via searching for.

Reporting - Add Workspace member "Invitation message" page appears when accessing deeplink #21412

or maybe https://www.upwork.com/nx/wm/offer/27406336 ?

I'm assuming he above payments that are due are correct, comment if anyone disagrees. Sorry for the delay here

@dhanashree-sawant
Copy link

Thanks @mallenexpensify, I found it, I have accepted the offer.

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2023
@mallenexpensify
Copy link
Contributor

Thanks @dhanashree-sawant , I've paid you and updated the comment above to reflect you've been paid (and everyone else has been too!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants