You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-10-27] [$500] Chat - The three-dot menu fails to close after clicking on "Pin" #28606
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Enter a name for the room and select the workspace.
Set the visibility of the room to "Public"
Click on the "Create room" button.
Go to "Share code" > "Copy URL to clipboard"
Open another browser where you are not signed in.
Paste the copied URL.
Click on three dots for menu and click on "Pin"
Expected Result:
Upon clicking "Pin" the three-dot menu should close
Actual Result:
The three-dot menu remains open after clicking on "Pin"
Workaround:
Unknown
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.75.8 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
changed the title [-]Chat - The three-dot menu fails to close after clicking on "Pin"[/-][+][$500] Chat - The three-dot menu fails to close after clicking on "Pin"[/+]on Oct 2, 2023
Chat - The three-dot menu fails to close after clicking on "Pin"
Root cause
We are using Session.checkIfActionIsAllowed to execute certain actions here when user is not logged the callback for onItemSelected never gets executed.
Changes
We can use the Modal.close action to hide any modal visible if the user is anonymous, we'll pass a new argument hideModal (false by default) and use the method if true
Please re-state the problem that we are trying to solve in this issue.
The three-dot menu remains open after clicking on "Pin"
What is the root cause of that problem?
When the user is anonymous and clicking Pin, the check here will lead the user to sign in. So the onPress of the menu was never called to close the popover menu.
What changes do you think we should make in order to solve the problem?
For popover menu, we have our own checks here for anonymous user, so we don't have to check inside MenuItem
We can add a flag shouldCheckActionAllowedOnPress to the MenuItem, defaults to true. Only if it's true, we wrap the onPress callback with the check here. If it's false we rely on the parent component's checks and do not check in MenuItem
Then we pass shouldCheckActionAllowedOnPress={false} in the popover menu.
What alternative solutions did you explore? (Optional)
We can fix the same for any parent component which uses MenuItem, that has the same issue.
An alternative is to call Modal.close, but this is noticeably slow, the menu will stay there for a while instead of being closed immediately. Also I prefer not touching global state if possible since it causes a lot of rerendering.
We need to check isAnonymousUser() and add isAnonymousAction=true on onSelected function of threeDotMenuItems on HeaderView.js.
For pin, we have already this check.
Alright, looks like none of the payments were made, so I've paid @ayazhussain79 and have sent offers to @dukenv0307 and @situchan - could you accept those so that we can pay and close?
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
[-]Chat - The three-dot menu fails to close after clicking on "Pin"[/-][+][$500] Chat - The three-dot menu fails to close after clicking on "Pin"[/+]melvin-bot commentedon Oct 2, 2023
Job added to Upwork: https://www.upwork.com/jobs/~018cbad69c4c13b118
melvin-bot commentedon Oct 2, 2023
Triggered auto assignment to @dylanexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 2, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Oct 2, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)ishpaul777 commentedon Oct 2, 2023
Proposal
Problem
Chat - The three-dot menu fails to close after clicking on "Pin"
Root cause
We are using
Session.checkIfActionIsAllowedto execute certain actions here when user is not logged the callback for onItemSelected never gets executed.Changes
We can use the
Modal.closeaction to hide any modal visible if the user is anonymous, we'll pass a new argument hideModal (false by default) and use the method if trueScreen.Recording.2023-10-02.at.7.12.25.PM.mov
dukenv0307 commentedon Oct 2, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The three-dot menu remains open after clicking on "Pin"
What is the root cause of that problem?
When the user is anonymous and clicking
Pin, the check here will lead the user to sign in. So theonPressof the menu was never called to close the popover menu.What changes do you think we should make in order to solve the problem?
For popover menu, we have our own checks here for anonymous user, so we don't have to check inside
MenuItemWe can add a flag
shouldCheckActionAllowedOnPressto theMenuItem, defaults totrue. Only if it's true, we wrap the onPress callback with the check here. If it's false we rely on the parent component's checks and do not check inMenuItemThen we pass
shouldCheckActionAllowedOnPress={false}in the popover menu.What alternative solutions did you explore? (Optional)
We can fix the same for any parent component which uses
MenuItem, that has the same issue.An alternative is to call
Modal.close, but this is noticeably slow, the menu will stay there for a while instead of being closed immediately. Also I prefer not touching global state if possible since it causes a lot of rerendering.yh-0218 commentedon Oct 2, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The three-dot menu remains open after clicking on "Pin"
What is the root cause of that problem?
When the user is clicking Pin, we show Login Modal and don't hide Popover menu.
App/src/components/MenuItem.js
Line 138 in 850e21e
What changes do you think we should make in order to solve the problem?
we need to show Login Modal and must close Popover menu.
For this.
App/src/components/MenuItem.js
Line 138 in bba600a
we can add
isAnonymousAction={item.isAnonymousAction}to hereApp/src/components/PopoverMenu/index.js
Line 101 in bba600a
For pin, we have already this check.
App/src/pages/home/HeaderView.js
Line 142 in bba600a
Add
App/src/pages/home/HeaderView.js
Line 138 in bba600a
We need to this check and add for other options (zoom, googlemeet)
What alternative solutions did you explore? (Optional)
dylanexpensify commentedon Oct 3, 2023
@situchan let's get some reviews! 🙇♂️
67 remaining items
melvin-bot commentedon Nov 29, 2023
Triggered auto assignment to @lschurr (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Nov 29, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)mountiny commentedon Nov 29, 2023
@lschurr could you help with the payment here please @situchan what is pending?
situchan commentedon Nov 29, 2023
Here's payment summary: #28606 (comment)
situchan commentedon Nov 29, 2023
Automatic offer failed on this issue.
I applied job as requested by @dylanexpensify
Job link: #28606 (comment)
lschurr commentedon Nov 29, 2023
Looks like @dylanexpensify is the BZ on this one. Could you take a look at this one?
situchan commentedon Nov 29, 2023
@lschurr @dylanexpensify is OOO. You're assigned based on https://expensify.slack.com/archives/C01GTK53T8Q/p1701271832347369?thread_ts=1701262010.017819&cid=C01GTK53T8Q.
Would be much appreciated if you can help.
lschurr commentedon Nov 29, 2023
Got it, thanks. Just reviewing the job now and seeing what happened with payments: https://www.upwork.com/ab/applicants/1721476234243555328/applicants
lschurr commentedon Nov 29, 2023
Alright, looks like none of the payments were made, so I've paid @ayazhussain79 and have sent offers to @dukenv0307 and @situchan - could you accept those so that we can pay and close?
Just repeating the payment summary here:
lschurr commentedon Nov 30, 2023
All payments done. Closing!