-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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-08-21] [$1000] Web - User is getting error message "Please select at least one member to invite" when invite members again from deeplink #23311
Comments
Triggered auto assignment to @garrettmknight ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.After select members, go to invite message page by deeplink, invite again and get "Please select one member". What is the root cause of that problem?After we submit, We can skip navigating after submitting to see it. (Remove this LOC) When we start to invite users again after using What changes do you think we should make in order to solve the problem?Take advantage of validate() {
const errorFields = {};
if (this.props.isFocused && _.isEmpty(this.props.invitedEmailsToAccountIDsDraft)) {
errorFields.welcomeMessage = 'workspace.inviteMessage.inviteNoMembersError';
}
return errorFields;
} As my testing, it's enough to works for both web and native apps, but if we want to make sure we can change order for navigating before updating Navigation.navigate(ROUTES.getWorkspaceMembersRoute(this.props.route.params.policyID));
Policy.setWorkspaceInviteMembersDraft(this.props.route.params.policyID, {}); What alternative solutions did you explore? (Optional)We can use a ref as a flag when submitting to skip App/src/pages/workspace/WorkspaceInviteMessagePage.js Lines 94 to 97 in be2c81f
|
Job added to Upwork: https://www.upwork.com/jobs/~018e72fd3799cdf925 |
Current assignee @garrettmknight is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - User is getting error message "Please select at least one member to invite" when invite members again from deeplink What is the root cause of that problem?When users go to we clear invitedEmailsToAccountIDsDraft
then the input is blurred and onValidate is executed, at that time invitedEmailsToAccountIDsDraft is empty so we set the error. Unfortunately, Lines 297 to 305 in 041d640
What changes do you think we should make in order to solve the problem?We should create the new function (isRouteInHistory) in Navigation.js to check the route (in this case it is and update this line
When we use type = 'UP' we can make sure the inviteMessage page is unmounted. Note If we don't use navigate(route, 'UP') in this case, when users click back button in InviteMember page, they will go to 'InviteMessage' page (it should be Workspace page) What alternative solutions did you explore? (Optional)We can add the new parameter to if shouldNavigateUp is true, we'll check if the ResultScreen.Recording.2023-07-21.at.20.39.39.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.Getting an error when going to the invite message page after finishing an invite from a deep link. What is the root cause of that problem?To go to the workspace invite message page, the user needs to open Settings > Workspace List > Workspace Detail > Workspace Members > Invite page > Invite message page. Navigating through the page normally will result in the following navigation stack: In the WS Invite message page, pressing the Invite button will:
App/src/pages/workspace/WorkspaceInviteMessagePage.js Lines 123 to 128 in 041d640
On the web, pressing the Invite button also blurs the text input, which triggers the Form validation. The validation will give an error if the member list draft is empty. As we clear the draft when pressing the Invite button, an error is returned from the validation. App/src/pages/workspace/WorkspaceInviteMessagePage.js Lines 150 to 156 in 041d640
But this is fine because we already navigated to the WS Members page and the WS Invite message page is popped from the stack, so we won't be able to see the error message. Btw, the navigation stack now looks like this: However, when we directly go to the invite message page (/workspace/{policyID}/invite-message), the navigation stack will be: Here is the issue. When we press Next, it will navigate to the existing WS Invite message that is still there on the stack. Because we are just navigating to the existing WS Invite message, the error from the Form validation is still there, thus we can see it. So, the real issue here is that we should make sure the WS Invite message is popped out after inviting users. What changes do you think we should make in order to solve the problem?Pop the WS invite message page before navigating to WS Members page.
|
Hi @garrettmknight, @rushatgabhane I had raised a similar issue 4 days back on slack, link to the issue: |
I have the same thought as giving @dhanashree-sawant reporter role. |
@ginsuma @dhanashree-sawant Cool, I'll update the role. @rushatgabhane either of those proposals look good to you? |
Alright, I think @bernhardoj has best explained the root cause. But I'm not sure about the solution. |
This might be a simple question. But can someone please help me understand why this issue is occuring?
Current state of draft => App/src/pages/workspace/WorkspaceInviteMessagePage.js Lines 123 to 126 in 041d640
Current state of draft => If the draft isn't empty, why is this bug occuring? |
That is because, in step 4, the validation runs when we press the Invite button, which throws an error. When we go to the invite message page again (step 6), we simply go back to that page, so we can see the error that is from the prev validation. Actually, the step can be simpler.
Calling goBack simply pop the current screen. We did this in a couple of places where we need to pop the current screen before navigating. |
Using goBack() seem like a workaround, it can cause the flicker (goBack and then navigate) The problem here is |
Ahh makes sense. So instead of going back to a page, can we Push a new instance of the page and navigate to it? We use stack navigator. What do you think about this? | Stack | Open the deeplink, and try to invite new members. | Stack | |
Hmm actually, my suggestion might be flawed because pressing the back button will take you to select members page twice. |
So another approach could be to replace the old invite message page with a new instance of the page. |
When you deep link to the invite message page and follow the suggestion, the stack will be: Select member is only one, but now we have 2 invite message pages and requires us to introduce a new navigation action to achieve that, which is PUSH.
This will be too much to achieve. We may need to use RESET action. Also, the stack is still wrong which affects the behavior of the back button.
Instead of thinking to replace it when navigating to it, why not just pop it out when we don't need it anymore, right? |
@rushatgabhane What do you think about my proposal and the comment? |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.53-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-08-21. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
|
Summarizing payments for this issue: #urgency bonus? No Upwork job is here: https://www.upwork.com/jobs/~018e72fd3799cdf925 |
i'll complete checklist tomo. I'm just waiting for existing manual requests to be approved so that I can complete all checklists, and request payments in one go |
@rushatgabhane you get a chance to complete the checklist yet? No rush, just checking. |
@garrettmknight, @AndrewGable, @rushatgabhane, @bernhardoj Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@rushatgabhane bump |
still waiting on the existing manual requests to be paid 😅 |
Checklist completed - #23311 (comment) Created a manual request here - https://staging.new.expensify.com/r/796011280744055 |
This issue can be closed if I'm the only one with pending payment because it'll be tracked on new dot |
$1,000 payment approved for @rushatgabhane based on BZ summary. |
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:
Expected Result:
User can invite members again
Actual Result:
User is getting error message "Please select at least one member to invite" when invite members again from deeplink.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.43-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
Screen.Recording.2023-07-20.at.6.58.50.PM.mov
Recording.3794.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689856757832959
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: