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 #16078] Chat - Disappears popup mentioning @here when clicking outside the compos box #20128

Closed
2 of 6 tasks
lanitochka17 opened this issue Jun 3, 2023 · 55 comments
Closed
2 of 6 tasks
Assignees

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 3, 2023

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


Issue found when executing Pr #19880

Action Performed:

  1. Open the App
  2. Go to any chat
  3. Type @here
  4. Click outside popup option
  5. Click again on the compose box

Expected Result:

Window with pop-up options appears, after user touches the compose box

Actual Result:

Disappears popup mentioning @here when clicking outside the compos box

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

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Bug6078928_19880_ios.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 3, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 3, 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

@allroundexperts
Copy link
Contributor

allroundexperts commented Jun 4, 2023

Proposal

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

Mention options do not appear when composer is re-focused on iOS

What is the root cause of that problem?

We're calculating (and showing) the suggestions menu only on selection change. The root cause of the issue is that on iOS, the onSelectionChange handler does not fire if the cursor is at the same position as it was before the composer became unfocused. As an example, if selection started and ended at position3, and then the composer went out of focus (due to page switching), and later it came into focus again at that same cursor position, the onSelectionChange event won't fire. This would cause the suggestions function here to not trigger.

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

We need to call calculateEmojiSuggestions and calculateMentionSuggestions function when the composer gets the initial focus. This can be done here.

We can also prevent the race condition that will happen on other platforms where both onSelectionChange and onFocus would happen when the composer comes into focus. This can be done by adding a check here to return early if composer state is not yet set to focused.

What alternative solutions did you explore? (Optional)

We can also run the suggestion calculation functions on composer focus for iOS only by creating a platform specific file.

@melvin-bot
Copy link

melvin-bot bot commented Jun 6, 2023

Triggered auto assignment to @dangrous (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@mallenexpensify
Copy link
Contributor

@allroundexperts good job in your explanation under "What is the root cause of that problem?"
I agree the issue is 'where' you click in the compose box. ie. if you click on whatever @[any-email] was highlighted, it'll likely show the popup. When you click a blank area in the compose box the popup might not show.

@dangrous 👀 plz. I'm unsure what's best

@melvin-bot melvin-bot bot removed the Overdue label Jun 6, 2023
@bernhardoj
Copy link
Contributor

This has the same root cause with this issue #16364 and probably the behavior gonna change based on this comment #16364 (comment).

@dangrous
Copy link
Contributor

dangrous commented Jun 6, 2023

So I don't think this is a feature that most people would expect (most apps don't do this) BUT we do seem to do it on other platforms and our goal is always consistency between the platforms so I think we should either fix it here, or remove it everywhere (which is also what the comment @bernhardoj linked to suggests).

Not sure if that's an answer or not. Something should be done, just not sure what. Maybe we should discuss in Slack, or hold on 16364 and see what gets decided there?

@melvin-bot melvin-bot bot added the Overdue label Jun 8, 2023
@dangrous
Copy link
Contributor

dangrous commented Jun 8, 2023

What do you think about ^ @mallenexpensify ? I'm happy to bring it up in #expensify-open-source if you agree, or we can just hold on #16364 and see what happens, and adjust this accordingly.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jun 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

@dangrous, @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@mallenexpensify
Copy link
Contributor

Thanks @dangrous , that was helpful. My take is.... this isn't a priority item to fix (regardless if it's a bug or new feature). Since there are other related issues, I propose we put this on hold pending

and also on

Bumping to weekly and removing Bug since it's going on hold

@melvin-bot melvin-bot bot removed the Overdue label Jun 13, 2023
@mallenexpensify mallenexpensify changed the title Chat - Disappears popup mentioning @here when clicking outside the compos box [HOLD #16078] Chat - Disappears popup mentioning @here when clicking outside the compos box Jun 13, 2023
@mallenexpensify mallenexpensify added Weekly KSv2 and removed Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jun 13, 2023
@dangrous
Copy link
Contributor

Yep, that works for me!

@dangrous
Copy link
Contributor

still on hold

@dangrous
Copy link
Contributor

#16078 is still in progress, so we're waiting

@melvin-bot melvin-bot bot added the Overdue label Jul 6, 2023
@dangrous
Copy link
Contributor

dangrous commented Jul 7, 2023

Same as above

@melvin-bot melvin-bot bot added the Overdue label Mar 12, 2024
@mallenexpensify
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Mar 13, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 25, 2024
@mallenexpensify
Copy link
Contributor

Still on hold

@melvin-bot melvin-bot bot removed the Overdue label Mar 27, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 5, 2024
@mallenexpensify
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Apr 10, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 18, 2024
@mallenexpensify
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Apr 23, 2024
@melvin-bot melvin-bot bot added the Overdue label May 2, 2024
@mallenexpensify
Copy link
Contributor

On hold

@melvin-bot melvin-bot bot removed the Overdue label May 7, 2024
@melvin-bot melvin-bot bot added the Overdue label May 16, 2024
@mallenexpensify
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label May 20, 2024
@melvin-bot melvin-bot bot added the Overdue label May 28, 2024
@dangrous
Copy link
Contributor

forever on hold

@melvin-bot melvin-bot bot removed the Overdue label May 28, 2024
@melvin-bot melvin-bot bot added the Overdue label Jun 6, 2024
@dangrous
Copy link
Contributor

Thanks for checking in on that other issue @mallenexpensify!

@melvin-bot melvin-bot bot removed the Overdue label Jun 11, 2024
@melvin-bot melvin-bot bot added the Overdue label Jun 19, 2024
@dangrous
Copy link
Contributor

Looks like the PR that fixes #16078 was merged, but I just saw a revert PR. Sooooo we may be waiting longer.

@melvin-bot melvin-bot bot removed the Overdue label Jun 20, 2024
@dangrous
Copy link
Contributor

dangrous commented Jun 24, 2024

Oh nice! the revert was not actually merged, so #16078 is now on prod.

I just used the testing steps on staging and I think that this has been fixed... Can you confirm by testing on your end @mallenexpensify ?

@mallenexpensify
Copy link
Contributor

I was not able to reproduce, based on the steps in the OP.

If I surface @here > click into a thread > click back buton, the pop up doesn't appear when I come back. Thanks def not this bug, not sure if it's a bug at all (just sharing cuz I noticed)

RPReplay_Final1719355901.MP4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants