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 2024-01-17] [$250] Action menu - Double-clicking the "Add Reaction" icon highlights the text of the message. #33547

Closed
2 of 6 tasks
kbecciv opened this issue Dec 23, 2023 · 51 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

@kbecciv
Copy link

kbecciv commented Dec 23, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.16-3
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Interna Team
Slack conversation:

Action Performed:

  1. Open New Expensify app
  2. Log in with any account
  3. Navigate to any conversation with the correspondence history
  4. Move the cursor over any text message
  5. Double-click on the "Add Reaction" icon in the action menu

Expected Result:

Double-clicking the "Add Reaction" icon in the action menu should not cause the text in the message to be highlighted.

Actual Result:

Double-clicking the "Add reaction" icon in the Action menu highlights the text in the message.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6324861_1703334379791.Recording__982.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a6ecd7244e8df2c0
  • Upwork Job ID: 1738559790251122688
  • Last Price Increase: 2024-01-04
  • Automatic offers:
    • hoangzinh | Reviewer | 28081103
    • bernhardoj | Contributor | 28081105
Issue OwnerCurrent Issue Owner: @hoangzinh
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 23, 2023
@melvin-bot melvin-bot bot changed the title Action menu - Double-clicking the "Add Reaction" icon highlights the text of the message. [$500] Action menu - Double-clicking the "Add Reaction" icon highlights the text of the message. Dec 23, 2023
Copy link

melvin-bot bot commented Dec 23, 2023

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

Copy link

melvin-bot bot commented Dec 23, 2023

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

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

melvin-bot bot commented Dec 23, 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

Copy link

melvin-bot bot commented Dec 23, 2023

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

@dukenv0307
Copy link
Contributor

dukenv0307 commented Dec 23, 2023

Proposal

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

Double-clicking the "Add reaction" icon in the Action menu highlights the text in the message.

What is the root cause of that problem?

We don't have userSelectNone style applied to the container of the icon, so when clicking twice it still triggers the text select effect.

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

Have userSelectNone style applied to the container of the icon, for example here or here.

Since those mini context menu icons are itself never selectable for the user, it makes sense to apply userSelectNone there.

What alternative solutions did you explore? (Optional)

We can apply the same solution if this happens for other context menu, components, ...

@Krishna2323
Copy link
Contributor

Krishna2323 commented Dec 23, 2023

Proposal

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

We don't apply userSelectNone style and pass dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}} prop to the element containing the icon.

style={({hovered, pressed}) => [
styles.reportActionContextMenuMiniButton,
StyleUtils.getButtonBackgroundColorStyle(getButtonState(hovered, pressed, isDelayButtonStateComplete)),
isDelayButtonStateComplete && styles.cursorDefault,
]}

What is the root cause of that problem?

We need to apply these apply userSelectNone and pass dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}.

style={styles.userSelectNone}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}

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

Result

@bernhardoj
Copy link
Contributor

Proposal

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

Double-clicking the emoji reaction mini context select the message.

What is the root cause of that problem?

We had this kind of issue before here (and many other issues). The message text gets selected because the emoji reaction is just a normal div. In that issue, the solution is to render the pressable as a button by setting the role of the pressable to BUTTON.

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

Set a role of BUTTON to mini context menu item.
role={CONST.ROLE.BUTTON}

Text selection won't happen if we press a <button>.
(perhaps we can by default set the pressable role to button?)

@hoangzinh
Copy link
Contributor

@dukenv0307 @Krishna2323 @bernhardoj Thanks for your proposals. All of proposals work, but I like @bernhardoj's proposal because:

Link to @bernhardoj's proposal #33547 (comment)

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 25, 2023

Triggered auto assignment to @aldo-expensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@dukenv0307
Copy link
Contributor

dukenv0307 commented Dec 25, 2023

@hoangzinh I don’t think that solution will work when the user clicks a bit outside a emoji reaction (outside the Pressable), but still inside the mini context menu, like below

Screen.Recording.2023-12-26.at.10.44.37.AM.mov

@hoangzinh
Copy link
Contributor

I'm unsure if it's worth fixing when user clicks outside icons ^

@dukenv0307
Copy link
Contributor

cc @aldo-expensify @kbecciv to confirm, since I think it should work consistently when clicking on the MiniContextMenu, regardless of clicking inside or outside the icons.

@bernhardoj
Copy link
Contributor

For the context menu container, it's just a plain view/element, not a clickable element, just like a message container. It already works as expected.

The issue here is that double-clicking a button shouldn't select a text.

Previously, we used either user-select none or ControlSelection as the workaround to fix it, but now we already have a proper way to do that by using the native button.

@melvin-bot melvin-bot bot added the Overdue label Dec 29, 2023
Copy link

melvin-bot bot commented Dec 30, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Jan 1, 2024

@hoangzinh, @Christinadobrzyn, @aldo-expensify Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Jan 1, 2024

@hoangzinh, @Christinadobrzyn, @aldo-expensify Eep! 4 days overdue now. Issues have feelings too...

@aldo-expensify
Copy link
Contributor

aldo-expensify commented Jan 2, 2024

Tried to reproduce in the public room https://staging.new.expensify.com/r/5593084223054221 in staging, but couldn't . Can anyone help confirm that this is still reproducible?

Screen.Recording.2024-01-02.at.1.55.07.PM.mov

@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2024
@aldo-expensify
Copy link
Contributor

aldo-expensify commented Jan 2, 2024

I see that the context menu for me closes when I click the second time, meanwhile, in the video shown in this GH issue body this doesn't happen. I guess this difference made the problem go away 🤷

@hoangzinh
Copy link
Contributor

@aldo-expensify this issue could be reproduced easier when double-clicking the "Copy to clipboard" icon.
Screenshot 2024-01-03 at 05 53 19

@aldo-expensify
Copy link
Contributor

@aldo-expensify this issue could be reproduced easier when double-clicking the "Copy to clipboard" icon.

Thanks, now I reproduced

@aldo-expensify
Copy link
Contributor

Hmm, maybe that did it.

@bernhardoj
Copy link
Contributor

I can do it.

@aldo-expensify
Copy link
Contributor

I can do it.

ok!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 4, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @hoangzinh

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 10, 2024
@melvin-bot melvin-bot bot changed the title [$250] Action menu - Double-clicking the "Add Reaction" icon highlights the text of the message. [HOLD for payment 2024-01-17] [$250] Action menu - Double-clicking the "Add Reaction" icon highlights the text of the message. Jan 10, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 10, 2024
Copy link

melvin-bot bot commented Jan 10, 2024

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

Copy link

melvin-bot bot commented Jan 10, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.23-4 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 2024-01-17. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jan 10, 2024

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:

  • [@hoangzinh] The PR that introduced the bug has been identified. Link to the PR:
  • [@hoangzinh] 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:
  • [@hoangzinh] 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:
  • [@hoangzinh] Determine if we should create a regression test for this bug.
  • [@hoangzinh] 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.
  • [@Christinadobrzyn] 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 labels Jan 16, 2024
Copy link

melvin-bot bot commented Jan 19, 2024

@hoangzinh, @bernhardoj, @Christinadobrzyn, @aldo-expensify, @dukenv0307 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@aldo-expensify
Copy link
Contributor

Bump @hoangzinh on completing the list

@hoangzinh
Copy link
Contributor

BugZero Checklist:

  • The PR that introduced the bug has been identified. Link to the PR: feat: add/remove reaction #15210
  • 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: https://github.com/Expensify/App/pull/15210/files#r1461997372
  • 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: N/A
  • Determine if we should create a regression test for this bug. ⛔ it's just a small UI improvement

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Jan 22, 2024

Hi can you confirm this is correct for payouts due?

Issue Reporter: NA
Contributor: $250 @bernhardoj (paid in Upwork) & $250 @dukenv0307 (paid in Upwork)
Contributor+: $500 @hoangzinh (paid in Upwork)

Eligible for 50% #urgency bonus? N

Upwork job is here.

Also, if everyone is getting paid through Upwork, @hoangzinh can you accept our offer so I can pay you through Upwork?

@aldo-expensify
Copy link
Contributor

That looks good to me

@Christinadobrzyn
Copy link
Contributor

Thanks @aldo-expensify! Paid @bernhardoj and @dukenv0307 - waiting on @hoangzinh to accept the Upwork offer

@hoangzinh
Copy link
Contributor

Accepted. Thanks @Christinadobrzyn

@melvin-bot melvin-bot bot removed the Overdue label Jan 23, 2024
@Christinadobrzyn
Copy link
Contributor

Thanks @hoangzinh! I paid you in Upwork based on this payment summary. So this is all done. Closing.

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
No open projects
Status: CRITICAL
Development

No branches or pull requests

8 participants