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 2024-03-05] [$500] Web - Chat - The "Menu" popup can't be closed again, tooltip is visible #35198
changed the title [-] Web - Chat - The "Menu" popup can't be closed again, tooltip is visible[/-][+][$500] Web - Chat - The "Menu" popup can't be closed again, tooltip is visible[/+]on Jan 25, 2024
when the anchorRef contain the target, that means we don't open the popover again.
Unfortunately, we handle anchorRef incorrectly in PopoverReportActionContextMenu. The anchorRef is pass to PopoverWithMeasuredContent is always undefined because we did not update this value
What changes do you think we should make in order to solve the problem?
In showContextMenu we add new param. For example, it's anchor, then update anchorRef to anchor
anchorRef.current=anchor.current
In ContextMenuItem, add new prop anchorRef then pass it to BaseMiniContextMenuItem. For now anchorRef will refer to the Menu button
<BaseMiniContextMenuItem
...
ref={anchorRef}
>
In BaseReportActionContextMenu, we just need to store the anchorRef of Menu button (index === 3)
📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
changed the title [-][$500] Web - Chat - The "Menu" popup can't be closed again, tooltip is visible[/-][+][HOLD for payment 2024-03-05] [$500] Web - Chat - The "Menu" popup can't be closed again, tooltip is visible[/+]on Mar 1, 2024
Activity
melvin-bot commentedon Jan 25, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0114ccd8b4d932efaf
[-] Web - Chat - The "Menu" popup can't be closed again, tooltip is visible[/-][+][$500] Web - Chat - The "Menu" popup can't be closed again, tooltip is visible[/+]melvin-bot commentedon Jan 25, 2024
Triggered auto assignment to @puneetlath (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 25, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)ZhenjaHorbach commentedon Jan 26, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - Chat - The "Menu" popup can't be closed again, tooltip is visible
What is the root cause of that problem?
The main problem with the issue is that we don't have a condition to close the modal
After each click we re-open the modal window
App/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
Lines 505 to 521 in 071046f
What changes do you think we should make in order to solve the problem?
To fix this issue and close modal we can use
hideContextMenuBut for this we need to know the state of the modal window
For this we can use
willAlertModalBecomeVisiblefromONYX.MODALWe need to get modal values from ONYX
then we need pass modal object in payload for
ContextMenuActionsApp/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.tsx
Lines 183 to 193 in 071046f
And then add condition for button
App/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
Lines 505 to 521 in 071046f
Screen.Recording.2024-01-26.at.02.01.15.mov
What alternative solutions did you explore? (Optional)
As alternative we can update ReportActionContextMenu and add new value for ref which will be responsible for the state of the open modal window
App/src/pages/home/report/ContextMenu/ReportActionContextMenu.ts
Lines 35 to 45 in 071046f
tienifr commentedon Jan 26, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The "Menu" popup can't be closed by clicking on the "..." button again. The "Menu" tooltip is displayed over the popup
What is the root cause of that problem?
In theory, when users press on the more icon again, the popover should be hidden (as what we did with emoji picker,...)
the logic to handle it here
App/src/components/PopoverProvider/index.tsx
Lines 39 to 41 in 7962905
when the
anchorRefcontain the target, that means we don't open the popover again.Unfortunately, we handle anchorRef incorrectly in PopoverReportActionContextMenu. The anchorRef is pass to
PopoverWithMeasuredContentis always undefined because we did not update this valueWhat changes do you think we should make in order to solve the problem?
anchor, then updateanchorReftoanchoranchorRefthen pass it toBaseMiniContextMenuItem. For nowanchorRefwill refer to the Menu buttonBaseReportActionContextMenu, we just need to store the anchorRef ofMenubutton (index === 3)Test branch: https://github.com/tienifr/App/tree/fix/35198
What alternative solutions did you explore? (Optional)
NA
Result
Screen.Recording.2024-01-26.at.14.45.50.mov
melvin-bot commentedon Jan 29, 2024
@puneetlath, @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
parasharrajat commentedon Jan 29, 2024
Oops, missed it. Gonna review it in sometime.
8 remaining items
melvin-bot commentedon Jan 30, 2024
📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
puneetlath commentedon Feb 13, 2024
Any updates here? How is this issue going?
parasharrajat commentedon Feb 28, 2024
PR is merged.
tienifr commentedon Mar 1, 2024
@puneetlath PR hit production. Melvin is malfunctioning. Please add HOLD for payment label.
[-][$500] Web - Chat - The "Menu" popup can't be closed again, tooltip is visible[/-][+][HOLD for payment 2024-03-05] [$500] Web - Chat - The "Menu" popup can't be closed again, tooltip is visible[/+]puneetlath commentedon Mar 5, 2024
Payment summary:
Thanks y'all.
parasharrajat commentedon May 20, 2024
Payment requested as per #35198 (comment)
JmillsExpensify commentedon May 31, 2024
$500 approved for @parasharrajat