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 #50639] [$250] Category - Long press a category&tap outside highlights the category in mWeb & not in hybrid #51394

Open
1 of 8 tasks
IuliiaHerets opened this issue Oct 24, 2024 · 32 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 24, 2024

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


Version Number: V9. 0.53-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N
Issue reported by: Applause Internet Team

Action Performed:

  1. Launch site in both mweb and hybrid app
  2. Tap profile icon -- Workspaces-- workspace
  3. Tap category
  4. Long press on a category and tap outside
  5. Note the category is highlighted in mweb and not in hybrid app

Expected Result:

Long pressing on a category and tapping outside must show same behavior in mweb and hybrid app.

Actual Result:

Long pressing on a category and tapping outside highlights the category in mweb and not in hybrid app.
Issue reproduced only in redmi devices.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6643788_1729720924313.Screenrecorder-2024-10-24-03-23-11-698_compress_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021853406887958563486
  • Upwork Job ID: 1853406887958563486
  • Last Price Increase: 2024-11-18
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 24, 2024
Copy link

melvin-bot bot commented Oct 24, 2024

Triggered auto assignment to @trjExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@IuliiaHerets
Copy link
Author

@trjExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@melvin-bot melvin-bot bot added the Overdue label Oct 28, 2024
@trjExpensify
Copy link
Contributor

Issue reproduced only in redmi devices.

Given this, I'm inclined to close this issue. @Expensify/design for a quick hip check before I do.

@melvin-bot melvin-bot bot removed the Overdue label Oct 29, 2024
@dubielzyk-expensify
Copy link
Contributor

Yeah I can't reproduce this

@trjExpensify
Copy link
Contributor

Great stuff, closing then.

@shahinyan11
Copy link

shahinyan11 commented Oct 30, 2024

@trjExpensify @dubielzyk-expensify The problem is still reproducible on last main

Untitled.mov

@trjExpensify
Copy link
Contributor

@shahinyan11 on a Redmi device only?

@shahinyan11
Copy link

@shahinyan11 on a Redmi device only?

On this simulator

Screenshot 2024-11-01 at 14 10 31

@trjExpensify
Copy link
Contributor

Oh hm, @dubielzyk-expensify what Android device did you test?

@dubielzyk-expensify
Copy link
Contributor

Tested it on a Pixel 7

@dubielzyk-expensify
Copy link
Contributor

My bad. I can actually reproduce it now. I'm still not overly convinced we should fix it, but I'll leave that decision to you @trjExpensify

@trjExpensify
Copy link
Contributor

Ah okay, so yeah.. I think we should at least investigate the root cause then if it's even reproducible on a Pixel.

@trjExpensify trjExpensify reopened this Nov 4, 2024
@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Nov 4, 2024
@melvin-bot melvin-bot bot changed the title Category - Long press a category&tap outside highlights the category in mWeb & not in hybrid [$250] Category - Long press a category&tap outside highlights the category in mWeb & not in hybrid Nov 4, 2024
Copy link

melvin-bot bot commented Nov 4, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 4, 2024
Copy link

melvin-bot bot commented Nov 4, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Nov 11, 2024
@c3024
Copy link
Contributor

c3024 commented Nov 11, 2024

I will check the proposal and update.

@melvin-bot melvin-bot bot removed the Overdue label Nov 11, 2024
@c3024
Copy link
Contributor

c3024 commented Nov 15, 2024

Waiting for valid proposals!

@melvin-bot melvin-bot bot removed the Overdue label Nov 15, 2024
@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@QichenZhu
Copy link
Contributor

Proposal

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

After long-pressing a selection list item and dismissing the context menu, the item is highlighted.

What is the root cause of that problem?

The item is focused by long-pressing, but the conditions below detect that the focus is triggered by touch and ignore it, so the item is not highlighted immediately.

shouldIgnoreFocus={Browser.isMobileChrome() && isScreenTouched}

if (shouldIgnoreFocus || isDisabled) {
return;
}

Instead, it is highlighted only after the context menu is closed, when the focus trap programmatically returns focus to the item.

https://github.com/focus-trap/focus-trap/blob/6c757fa2a90bb818b7f702ba4129d14cdc733f7e/index.js#L769

Screenshot 2024-11-13 at 2 51 43 PM

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

In addition to ignoring focus triggered by touch, we should also ignore programmatic focus.

import * as Browser from '@libs/Browser';
onFocus={(event) => {

if (shouldIgnoreFocus || isDisabled) {
return;
}

    // Insert this after the above code.
    if (Browser.isMobileChrome() && event && event.nativeEvent && !event.nativeEvent.sourceCapabilities) {
        return;
    }

What alternative solutions did you explore? (Optional)

N/A

@wildan-m
Copy link
Contributor

It has the same root cause with #50639

My proposal for the issue: #50639 (comment)

Copy link

melvin-bot bot commented Nov 18, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Nov 18, 2024
@gev990
Copy link

gev990 commented Nov 18, 2024

Proposal

Note I have noticed a proposal here from another member that does not currently exist, and since I have liked the main concept of that proposal I decided to post a new proposal that may be similar to the proposal that was there previously.

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

Category - Long press a category&tap outside highlights the category in mWeb & not in hybrid

What is the root cause of that problem?

Here we ignore focus when shouldIgnoreFocus is true. And here you can see a description in which cases shouldIgnoreFocus will be true
Now the problem occurs because onFocus event is also triggered after closing modal when the shouldIgnoreFocus is false.

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

Move the ignore focus logic inside BaseListItem component and blur the focused item before return

  1. Pass shouldIgnoreFocus as a prop to ListItem component.
  2. Add shouldIgnoreFocus in TableListItem component's props and pass following prop shouldIgnoreFocus={shouldIgnoreFocus} to BaseListItem
  3. Add shouldIgnoreFocus in BaseListItem component's props and update this onFocus to bellow
onFocus={()=>{
    if(shouldIgnoreFocus || isDisabled) {
        pressableRef.current?.blur()
        return;
    }
    onFocus()
}}

What alternative solutions did you explore? (Optional)

Copy link

melvin-bot bot commented Nov 19, 2024

@trjExpensify, @c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@trjExpensify
Copy link
Contributor

It has the same root cause with #50639

My proposal for the issue: #50639 (comment)

Given that, @c3024 do you think this is a dupe?

@c3024
Copy link
Contributor

c3024 commented Nov 20, 2024

Yes, I think fixing that issue should fix this too. We can hold off this issue for #50639.

@melvin-bot melvin-bot bot removed the Overdue label Nov 20, 2024
@trjExpensify
Copy link
Contributor

Sounds good to me, putting it on hold.

@trjExpensify trjExpensify added Weekly KSv2 and removed Daily KSv2 labels Nov 20, 2024
@trjExpensify trjExpensify changed the title [$250] Category - Long press a category&tap outside highlights the category in mWeb & not in hybrid [Hold #50639] [$250] Category - Long press a category&tap outside highlights the category in mWeb & not in hybrid Nov 20, 2024
@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Dec 16, 2024
Copy link

melvin-bot bot commented Dec 16, 2024

This issue has not been updated in over 15 days. @trjExpensify, @c3024 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Dec 16, 2024
@trjExpensify
Copy link
Contributor

Still held on this PR: #53120

@trjExpensify trjExpensify added Weekly KSv2 and removed Monthly KSv2 labels Dec 16, 2024
@trjExpensify trjExpensify removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 3, 2025
@melvin-bot melvin-bot bot added the Overdue label Jan 3, 2025
@trjExpensify
Copy link
Contributor

Same as above, Melv.

@melvin-bot melvin-bot bot removed the Overdue label Jan 3, 2025
@melvin-bot melvin-bot bot added the Overdue label Jan 13, 2025
@trjExpensify
Copy link
Contributor

Same, melv.

@melvin-bot melvin-bot bot removed the Overdue label Jan 13, 2025
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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Development

No branches or pull requests

9 participants