Skip to content
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 #15289][$1000] If Action Menu is open, then Drag ad Drop in the report screen does not work. #17300

Closed
2 of 6 tasks
kavimuru opened this issue Apr 11, 2023 · 50 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Apr 11, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Navigate to any chat
  2. Click +(Actions) from Composer
  3. Now Drag any attachment to chat window

Expected Result:

Drag and Drop should work when the Action menu is open.

Actual Result:

Drag and Drop does not work if the Action modal is open

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.2.98-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

drag-and-drop-doesnt-work-on-modal-open.mov
Recording.209.mp4

Expensify/Expensify Issue URL:
Issue reported by: @jayeshmangwani
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681209641233429

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012e8154200f668718
  • Upwork Job ID: 1646264709398183936
  • Last Price Increase: 2023-04-12
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 11, 2023
@MelvinBot
Copy link

Triggered auto assignment to @Christinadobrzyn (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@MelvinBot
Copy link

MelvinBot commented Apr 11, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Apr 12, 2023
@melvin-bot melvin-bot bot changed the title If Action Menu is open, then Drag ad Drop in the report screen does not work. [$1000] If Action Menu is open, then Drag ad Drop in the report screen does not work. Apr 12, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~012e8154200f668718

@MelvinBot
Copy link

Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new.

@MelvinBot
Copy link

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (External)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 12, 2023
@MelvinBot
Copy link

Triggered auto assignment to @yuwenmemon (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@hoangzinh
Copy link
Contributor

hoangzinh commented Apr 13, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

If Action Menu is open, then Drag ad Drop in the report screen does not work

What is the root cause of that problem?

Currently Action Menu is rendered by Popover component, but it's not implemented properly. Popover is based on Modal, thus when it's displayed, there is a full-screen backdrop behind => The DragAndDrop component can not catch the drag & drop events

What changes do you think we should make in order to solve the problem?

There are few of options:
Option 1: We can refactor Popover component it's truly Popover, and don't based on Modal => I recall this option is discussing and it's not easy to make decision & implement.
Option 2: We can replicate what we did for FAB popover here. More details, when Popover is visible, we listen on dragover event to automatically hide modal => it will remove full-screen backdrop. To narrow the scope, I think we can add those events into component ReportActionCompose.

During testing, I found out there are 2 places having similar issues:

  • Emoji picker
  • Context menu of a Report message
    Screenshot 2023-04-13 at 08 53 44
    Screenshot 2023-04-13 at 08 53 39
    => It can easily fix by same solution above

@Armedin
Copy link

Armedin commented Apr 13, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

If Action Menu is open, then Drag and Drop in the report screen does not work.

What is the root cause of that problem?

The Popover component which is responsible for rendering the Action Menu, uses Modal under the hood. However, when Modal is active, the Modal's backdrop sits on top of all the other elements thus intercepting the event listeners attached to those elements.

This problem doesn't occur only in Action Menu, but also in other places where the PopoverMenu component is used; such as Emoji Menu.

What changes do you think we should make in order to solve the problem?

Among many feasible solutions - the best option is to build a new component that detects when a dragover event happens in its child element. Let's call this component DragListener. The code will look something like this:

Screenshot at Apr 13 05-59-05

Then wrap the Action Menu with DragListener and simply set the menu visibility to false when a dragover event is detected.

Screenshot at Apr 13 06-08-47

Working solution

Untitled.mov

Similarly, all the Popover Menu components where a similar problem occurs can be wrapped with DragListener.

@MelvinBot
Copy link

📣 @Armedin! 📣

Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.

Screen Shot 2022-11-16 at 4 42 54 PM

Format:

Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@Armedin
Copy link

Armedin commented Apr 13, 2023

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~01acc492375d3f53b0

@MelvinBot
Copy link

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@situchan
Copy link
Contributor

This might be fixed in #15289 which is popover refactor

@allroundexperts
Copy link
Contributor

That's correct. This should be fixed after #15289 is implemented.

@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented Apr 13, 2023

Thanks @situchan & @allroundexperts. As I still see it still has the help wanted label, @aimane-chnaif will this get handled on #15289 can you confirm?

@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented Apr 13, 2023

Thanks @situchan & @allroundexperts. As I still see it still has the help wanted label, @aimane-chnaif will this get handled on #15289 can you confirm?

Let's put this on HOLD rather than close since we've not picked up final solution yet. But will likely to go with popover refactor.

@aimane-chnaif
Copy link
Contributor

cc: @dangrous

@Christinadobrzyn Christinadobrzyn changed the title [$1000] If Action Menu is open, then Drag ad Drop in the report screen does not work. [HOLD for #15289][$1000] If Action Menu is open, then Drag ad Drop in the report screen does not work. Apr 13, 2023
@Christinadobrzyn Christinadobrzyn added Weekly KSv2 and removed Daily KSv2 labels Apr 13, 2023
@Christinadobrzyn
Copy link
Contributor

Changed Title and labeled this weekly while we wait for #15289 to be complete

@melvin-bot melvin-bot bot added the Overdue label Apr 24, 2023
@yuwenmemon
Copy link
Contributor

Still on HOLD

@melvin-bot melvin-bot bot removed the Overdue label Jul 31, 2023
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Jul 31, 2023

back from ooo - thanks for handling this @zanyrenney I can take it off your plate!

Monitoring PR here - #22335 (comment) - gonna move to weekly while we wait for PR to be done

@Christinadobrzyn Christinadobrzyn added Weekly KSv2 and removed Daily KSv2 labels Jul 31, 2023
@Christinadobrzyn
Copy link
Contributor

Monitoring - #22335 (comment)

2 similar comments
@Christinadobrzyn
Copy link
Contributor

Monitoring - #22335 (comment)

@Christinadobrzyn
Copy link
Contributor

Monitoring - #22335 (comment)

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@Christinadobrzyn
Copy link
Contributor

Monitoring - #22335 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Aug 28, 2023
@Christinadobrzyn Christinadobrzyn removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 28, 2023
@Christinadobrzyn
Copy link
Contributor

Monitoring - #22335 (comment)

2 similar comments
@Christinadobrzyn
Copy link
Contributor

Monitoring - #22335 (comment)

@Christinadobrzyn
Copy link
Contributor

Monitoring - #22335 (comment)

@melvin-bot melvin-bot bot added the Overdue label Sep 28, 2023
@Christinadobrzyn
Copy link
Contributor

#22335 (comment) is getting paid next Tuesday! I'll test this again tomorrow.

@melvin-bot melvin-bot bot removed the Overdue label Sep 29, 2023
@Christinadobrzyn Christinadobrzyn added Daily KSv2 Overdue and removed Weekly KSv2 labels Sep 29, 2023
@melvin-bot melvin-bot bot removed the Overdue label Sep 29, 2023
@yuwenmemon yuwenmemon removed their assignment Sep 29, 2023
@Christinadobrzyn
Copy link
Contributor

Tested the steps in the OP and I can confirm the drag and drop isn't working.

What do you think @Santhosh-Sellavel @aimane-chnaif @yuwenmemon @dangrous

Do you think we should move forward with this fix?

@allroundexperts
Copy link
Contributor

@Christinadobrzyn Can you share a screen recording of it not working? It seems to work fine on my end. Thanks!

@aimane-chnaif
Copy link
Contributor

This is not reproducible anymore and can be closed.

@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2023
@zanyrenney
Copy link
Contributor

Closing.

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2023
@jayeshmangwani
Copy link
Contributor

@zanyrenney @Christinadobrzyn This Issue has been fixed in another issue, so am I eligible for reporting bonus or not for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests