-
Notifications
You must be signed in to change notification settings - Fork 3k
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-04-03 [$500] Workspace - 3 dot menu in WS listing/WS chat stops working after viewing WS avatar #37609
Comments
Triggered auto assignment to @abekkala ( |
We think that this bug might be related to #wave6 |
@abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace - 3 dot menu in WS listing/WS chat stops working after viewing WS avatar What is the root cause of that problem?
App/src/components/Modal/BaseModal.tsx Lines 96 to 106 in af68510
What changes do you think we should make in order to solve the problem?We should set Remove the line below: App/src/components/Modal/BaseModal.tsx Line 80 in af68510
useEffect(
() => {
isVisibleRef.current = isVisible;
return () => {
// Only trigger onClose and setModalVisibility if the modal is unmounting while visible.
if (!isVisibleRef.current) {
return;
}
hideModal(true);
};
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[],
); Both solutions works as expectedmodal_onhide_issue.mp4AlternativelyRemove useEffect(
() => () => {
// Only trigger onClose and setModalVisibility if the modal is unmounting while visible.
if (!isVisible) {
return;
}
hideModal(true);
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[],
); |
ProposalPlease re-state the problem that we are trying to solve in this issue.Can't open the three-dot menu after opening a workspace avatar. What is the root cause of that problem?The three-dot menu won't show when it's behind a modal.
The condition that always fails is App/src/components/Modal/BaseModal.tsx Lines 79 to 83 in 22cb01c
but when we close the WS avatar page, App/src/components/Modal/BaseModal.tsx Lines 62 to 64 in 22cb01c
App/src/components/Modal/BaseModal.tsx Lines 96 to 106 in 22cb01c
but at the time the modal is unmounted, the visible state is already updated to false, or when App/src/components/Modal/BaseModal.tsx Line 187 in 22cb01c
The first one already works as expected, but the second one is the issue. The reason it didn't get called is that when we press the close button of the WS avatar modal, it will update the visible state to false and call App/src/components/AttachmentModal.tsx Lines 388 to 396 in 22cb01c
and in App/src/pages/ReportAvatar.tsx Lines 33 to 35 in 22cb01c
So, the What changes do you think we should make in order to solve the problem?We need to make sure the
We set it to true when the modal becomes visible. App/src/components/Modal/BaseModal.tsx Lines 83 to 87 in ddf9e7a
And we set it to false when App/src/components/Modal/BaseModal.tsx Lines 63 to 65 in ddf9e7a
This will make sure the What alternative solutions did you explore? (Optional)Or we can switch the order of setting the visible state and calling App/src/components/AttachmentModal.tsx Lines 388 to 394 in 22cb01c
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Can't open the three-dot menu after opening a workspace/profile/report avatar. What is the root cause of that problem?
Explanation:
the bug also occurs when we click outside the modal ( we introduced What changes do you think we should make in order to solve the problem?To fix this problem from root and prevent future similar bugs when using navigation inside What alternative solutions did you explore? (Optional)
} else {
Modal.willAlertModalBecomeVisible(false);
} to call it when we change visibility in here. this is happening before navigation => unmount.
|
@abekkala Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@abekkala Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@lanitochka17 hmm, yeah, I feel that the 3 dot menu should always work |
Job added to Upwork: https://www.upwork.com/jobs/~01d9482d637d6fa5bd |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace - 3 dot menu in WS listing/WS chat stops working after viewing WS avatar What is the root cause of that problem?BaseModal sets willAlertModalBecomeVisible to true, but fails to set it back to false after the modal is closed. After the modal closes there is no reason for willAlertModalBecomeVisible to be true, since the modal will not become visible because it has closed. App/src/components/Modal/BaseModal.tsx Lines 79 to 94 in 44fc9e1
What changes do you think we should make in order to solve the problem?Set willAlertModalBecomeVisible to false when BaseModal closes. Do this by calling Modal.willAlertModalBecomeVisible(false) in the clean-up function which is called when the modal closes, this function. App/src/components/Modal/BaseModal.tsx Lines 88 to 93 in 44fc9e1
|
@allroundexperts when you have a moment can you review the proposals that have come in so far? |
ProposalPlease re-state the problem that we are trying to solve in this issue.The Three Dots Menu stops working after viewing WS Avatar in a preview modal. What is the root cause of that problem?After viewing the avatar in the modal then clicking the ThreeDotsMenu, its What changes do you think we should make in order to solve the problem?The Three Dots Menu should not be dependent on the state of the modal. In What alternative solutions did you explore? (Optional)The modal state bug, as others have already proposed, should also be fixed - but maybe as a separate issue? |
We occasionally open the modals by keyboard shortcuts as well. This would fail in that case. |
My solution still works for this case, because the popover menu is closed on blur (not by a close button). So anytime the user does anything it is already closing properly. I've tried this using the shortcuts to open the RHP and LHP, but I'm not actually seeing a shortcut to open a modal. Am I missing something? |
No, I just tested it and it seems to work. However, can you verify if applying your fix won't bring back #33541? |
Thanks for your proposal @kmbcook. I see that your solution is similar to what @rayane-djouah proposed earlier. You're suggesting to apply the same fix at a different place. Is there any reason for it? How is it any better from applying it at the screen level? |
I'm leaning towards @rayane-djouah's proposal since it fixes the problem at its root. The other proposals seem to be more of a patch work on the original problem. That being said, I'm open to a discussion if anyone disagrees. 🎀 👀 🎀 C+ reviewed |
@allroundexperts bump |
I actually didn't read that earlier proposal carefully. Looks like it is better. |
@bernhardoj I went through your proposal again and I still think that @rayane-djouah's proposal is better. In my opinion, we should not rely on I hope that clarified the reasoning for selecting @rayane-djouah's proposal. |
@allroundexperts I'm still unconvinced about setting the I think it's just about the attachment modal lifecycle. The
We can just remove the Or if we still want to keep the App/src/components/Modal/BaseModal.tsx Lines 96 to 103 in c915e7f
|
I agree with @bernhardoj, we aren't solving the root cause here. App/src/components/Modal/BaseModal.tsx Lines 96 to 103 in c915e7f
App/src/components/Modal/BaseModal.tsx Lines 62 to 77 in c915e7f
|
@bernhardoj Are you sure that removing this will not cause any regressions? |
@allroundexperts after some testing, I found that replacing
Now I know why we use So, we can't use the solution of replacing |
For now, I still feel like the chosen proposal is the best one. |
@allroundexperts, what do you think about my proposal? It works as expected. |
@allroundexperts I have updated my proposal's main solution to make sure |
Triggered auto assignment to @isabelastisser ( |
@isabelastisser I'm ooo until April 08 - I'll be taking back any issues still Open once I return CURRENT STATUS:@allroundexperts has chosen a proposal by @rayane-djouah. A PR has already been merged: #38098 which was just deployed to staging. Once it has deployed to prod this issue should update with a payment date.
|
No updates. |
@isabelastisser PR was deployed to production #38098 (comment) on Mar, 27. |
Payment summary: Fix: @rayane-djouah $500 - paid in Upwork |
Payment summary:
PR: Review @allroundexperts $500 - pending payment in newdot. |
$500 approved for @allroundexperts |
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: 1.4.46-0
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): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
3 dot menu in WS listing page (to access delete, admin & announce rooms) & in WS chat (to select unpin/pin option) should work after viewing WS avatar
Actual Result:
3 dot menu in WS listing/WS chat stops working after viewing WS avatar
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6398331_1709303779903.RPReplay_Final1709297090.mp4
Bug6398331_1709303779912.WEB.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: