-
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 2024-10-07] Workspace - Invite message comes back after deleting it #49899
Comments
Triggered auto assignment to @dangrous ( |
👋 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:
|
Edited by proposal-police: This proposal was edited at 2024-09-29 18:55:32 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Invite message comes back after deleting it What is the root cause of that problem?We are setting App/src/pages/workspace/WorkspaceInviteMessagePage.tsx Lines 89 to 94 in 3047c1b
What changes do you think we should make in order to solve the problem?We can remove this code block App/src/pages/workspace/WorkspaceInviteMessagePage.tsx Lines 89 to 94 in 3047c1b
We should test the code to make sure everything is working properly What alternative solutions did you explore? (Optional) |
Edited by proposal-police: This proposal was edited at 2024-09-29 19:17:45 UTC. ProposalOffending PR: #48660Please re-state the problem that we are trying to solve in this issue.Workspace - Invite message comes back after deleting it What is the root cause of that problem?
App/src/pages/workspace/WorkspaceInviteMessagePage.tsx Lines 77 to 94 in 3047c1b
What changes do you think we should make in order to solve the problem?
App/src/pages/workspace/WorkspaceInvitePage.tsx Lines 78 to 83 in 3047c1b
TO: useEffect(() => {
return () => {
Member.setWorkspaceInviteMembersDraft(route.params.policyID, {});
Policy.setWorkspaceInviteMessageDraft(route.params.policyID, null);
};
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
}, [route.params.policyID]);
What alternative solutions did you explore? (Optional)Result |
ProposalPlease re-state the problem that we are trying to solve in this issue.when a user deletes the invite message in the workspace invite process, the message reappears unexpectedly. What is the root cause of that problem?The root cause of this problem is that the component was automatically resetting the welcome message to its default value, even when the user had intentionally deleted it What changes do you think we should make in order to solve the problem?we should update the useEffect to add a check that skips resetting the invite message if it is already empty. This ensures that when the user deletes the message, it doesn't get reset to the default value. Add App/src/pages/workspace/WorkspaceInviteMessagePage.tsx Lines 89 to 92 in 3047c1b
to:
Screen.20Recording.202024-09-30.20at.203.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Invite message comes back after deleting it What is the root cause of that problem?Since we set
What changes do you think we should make in order to solve the problem?We should remove // .src/pages/workspace/WorkspaceInviteMessagePage.tsx#L94
useEffect(() => {
if (isEmptyObject(invitedEmailsToAccountIDsDraft)) {
return;
}
setWelcomeNote(getDefaultWelcomeNote());
- }, [getDefaultWelcomeNote, invitedEmailsToAccountIDsDraft]);
+ }, [invitedEmailsToAccountIDsDraft]); and We need to validate this input, if necessary, to avoid empty values ("") // .src/pages/workspace/WorkspaceInviteMessagePage.tsx#L119
if (isEmptyObject(invitedEmailsToAccountIDsDraft)) {
errorFields.welcomeMessage = translate('workspace.inviteMessage.inviteNoMembersError');
- }
+ } else if (isEmptyObject(welcomeNote)) {
+ errorFields.welcomeMessage = 'Please enter a welcome note.';
} POC
Screen.Recording.2024-09-30.at.09.24.15.mp4 |
Seems to be a frontend issue, so removing Web-E blocker |
@dangrous Yeah. Fixing an eslint error (i.e. using useOnyx instead of withOnyx) during some last-minute changes caused this issue. I think we can consider this as a separate issue. Please assign me here as I have the context.
We need the second |
Yep checking for an empty welcome note makes sense to me. Can you raise that PR quick? |
Sure. Working on the PR now. Will update in about an hour |
@dangrous PR is ready for review. |
I think you've outlined it exactly how I was understanding it. 👍 |
@dangrous I think it’s best to open it up to contributors again to get the best proposal as this does not seem like a minor adjustment. |
Okay cool! I may actually just make a new issue for it, so we can close this one out / pay. It's more of a clarification on expected behavior than a regression or anything that should be handled here. I'm also going to hold it on #49996 which is related and should make things easier. |
Made #51096! |
Yeah. Since another issue is created for the enhancement, I think we can pay as per this comment and close this one out. cc @JmillsExpensify |
Ok, so based on that comment, we'd have:
|
Offers sent to both via Upwork. |
Accepted, Thank you. |
Accepted the offer. Thanks |
Both paid out. Thank you! |
Current assignee @JmillsExpensify is eligible for the Bug assigner, not assigning anyone new. |
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:
|
Steps:
|
@tgolen BZ Checklist done |
Yep, we should be good here now. I'll close it out. Thanks! |
Actually, I was wrong. @JmillsExpensify this needs a regression test created and I think that's your part of the checklist. |
Test created and linked above, so closing this issue. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.41-2
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Message is deleted
Actual Result:
The deleted message comes back
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6618028_1727488696018.Screen_Recording_2024-09-28_at_4.50.36_at_night.mp4
View all open jobs on GitHub
Issue Owner
Current Issue Owner: @JmillsExpensifyThe text was updated successfully, but these errors were encountered: