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 payment 2023-05-03] [$1000] Long click on IOU, code block, and attachment shows a context menu #17487

Closed
1 of 6 tasks
kavimuru opened this issue Apr 16, 2023 · 25 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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 16, 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. Open any chat
  2. Send code block message, i.e.
    code block message
  3. Long click the code block message
  4. Notice a context menu appear

Expected Result :

Long click/press should work on mobile screen only

Actual Result :

Long click/press opens the context menu on web/desktop

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.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):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-04-15.at.21.59.48.mov
Recording.249.mp4

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

View all open jobs on GitHub

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

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

@MelvinBot
Copy link

MelvinBot commented Apr 16, 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

@twisterdotcom
Copy link
Contributor

@twisterdotcom
Copy link
Contributor

Okay this is a bug. I reproduced it on desktop and web. Clicking a code block (must be ```) for a "long" time - basically simulating a long press, shows the context menu when it shouldn't. We should mirror right click only for long press on web and desktop.

@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Apr 18, 2023
@melvin-bot melvin-bot bot changed the title Long click on IOU, code block, and attachment shows a context menu [$1000] Long click on IOU, code block, and attachment shows a context menu Apr 18, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~01bb6ea1d77a046b27

@MelvinBot
Copy link

Current assignee @twisterdotcom 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 - @sobitneupane (External)

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

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

@tienifr
Copy link
Contributor

tienifr commented Apr 18, 2023

Proposal

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

Long click/press opens the context menu on web/desktop for IOU, code block and attachment.

What is the root cause of that problem?

Let's say for code block, in here

onLongPress={event => showContextMenuForReport(event, anchor, reportID, action, checkIfContextMenuActive)}
we're showing the context menu on long press. The same can be found for other places like IOU, code block, attachment.

It was added from this PR #12987 where we fix a bug that cause long press not to work for some specific cases for mobile device.

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

In showContextMenuForReport here

function showContextMenuForReport(event, anchor, reportID, action, checkIfContextMenuActive) {
we need to check if we're on touch screen (by using, say, DeviceCapabilities.canUseTouchScreen()), if yes then we'll show the context menu, if not do nothing since the correct action is to right click.

We should probably rename the function to something else as well to be more clear.

What alternative solutions did you explore? (Optional)

NA

@sobitneupane
Copy link
Contributor

Thanks for the proposal @tienifr.

The proposal looks good to me. Let's make sure to include screen recordings for iPad as well in PR.

🎀👀🎀 C+ reviewed

cc: @francoisl

@francoisl
Copy link
Contributor

Yeah pretty straightforward 👍

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

📣 @tienifr You have been assigned to this job by @francoisl!
Please apply to this job in Upwork 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 📖

@tienifr
Copy link
Contributor

tienifr commented Apr 24, 2023

The PR is ready for review #17782

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 26, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Long click on IOU, code block, and attachment shows a context menu [HOLD for payment 2023-05-03] [$1000] Long click on IOU, code block, and attachment shows a context menu Apr 26, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 26, 2023
@MelvinBot
Copy link

Reviewing label has been removed, please complete the "BugZero Checklist".

@MelvinBot
Copy link

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.5-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-05-03. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@MelvinBot
Copy link

MelvinBot commented Apr 26, 2023

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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@sobitneupane] Determine if we should create a regression test for this bug.
  • [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@twisterdotcom] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 Daily KSv2 labels May 2, 2023
@twisterdotcom
Copy link
Contributor

@sobitneupane - could you complete the BugZero checklist?

@sobitneupane, @tienifr and @bernhardoj - could you apply to the job for $1000, $1000 and $250 respectively? https://www.upwork.com/jobs/~01bb6ea1d77a046b27

@sobitneupane
Copy link
Contributor

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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

#12987

  • [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

#12987 (comment)

  • [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

I don't think any update in PR review checklist should be added. This particular feature was added and implemented across all platforms. I would say it is an improvement in the app rather than bug fixing.

@melvin-bot melvin-bot bot removed the Overdue label May 8, 2023
@sobitneupane
Copy link
Contributor

Regression Test Proposal:

  1. Login with any account
  2. Open any chat
  3. Send code block as a message (wrapped around by three back-ticks ```)
  4. Long click/press the message
  5. (Web, Desktop) Verify that context menu doesn't show
  6. (mWeb, Native) Verify that context menu shows
  7. Send an attachment
  8. Repeat step 4-6
  9. Send a link
  10. Repeat step 4-6

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added the Overdue label May 10, 2023
@twisterdotcom
Copy link
Contributor

Sorry folks, I thought I was still waiting for you to accept offers, but I need to make them. I forget that this process needs so many steps still. I've done this now - please accept when you can and I'll get the payment sorted.

@melvin-bot melvin-bot bot removed the Overdue label May 11, 2023
@twisterdotcom
Copy link
Contributor

Here's the Issue timeline analysis:
🐛 Issue created at: Sun, 16 Apr 2023 20:59:20 GMT
🧯 Help Wanted at: Tue, 18 Apr 2023 16:46:57 GMT
🕵🏻 Contributor assigned at: Fri, 21 Apr 2023 21:30:27 GMT
🛸 PR created at: Thu, 24 Nov 2022 10:34:00 GMT
🎯 PR merged at: Thu, 12 Jan 2023 23:15:17 GMT
⌛ Business Days Elapsed between assignment and PR merge: -76

💰 Timeline Bonus/Penalty: 50% Bonus! 🎉

If there were any OOO days holidays, please reconsider the bonus based on above timeline!

@bernhardoj
Copy link
Contributor

@twisterdotcom I get "This offer is not available anymore"

@twisterdotcom
Copy link
Contributor

I've sent it again now. I have no clue why this happens.

@bernhardoj
Copy link
Contributor

Thanks! Accepted.

@twisterdotcom
Copy link
Contributor

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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

7 participants