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-06-06] [$250] Chat - Emojis auto-selected after sending a message with a space before choosing from composer #41433

Closed
2 of 6 tasks
lanitochka17 opened this issue May 1, 2024 · 40 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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

@lanitochka17
Copy link

lanitochka17 commented May 1, 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: 1.4.69-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: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open any chat
  2. Add a space, type, and send a message
  3. Select emojis from the composer

Expected Result:

Emojis should not auto-select

Actual Result:

Emojis auto-selected after sending a message with a space before choosing from the composer

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

Bug6468186_1714582751940.Screen_Recording_2024-05-01_at_9.40.18_AM.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012e8ae36539563c3f
  • Upwork Job ID: 1786441339870445568
  • Last Price Increase: 2024-05-10
  • Automatic offers:
    • ishpaul777 | Reviewer | 0
Issue OwnerCurrent Issue Owner: @StaniMilko
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 1, 2024
Copy link

melvin-bot bot commented May 1, 2024

Triggered auto assignment to @lschurr (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.

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label May 3, 2024
@melvin-bot melvin-bot bot changed the title Chat - Emojis auto-selected after sending a message with a space before choosing from composer [$250] Chat - Emojis auto-selected after sending a message with a space before choosing from composer May 3, 2024
Copy link

melvin-bot bot commented May 3, 2024

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

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

melvin-bot bot commented May 3, 2024

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

@lschurr
Copy link
Contributor

lschurr commented May 3, 2024

Hi @ishpaul777 - when you get a chance can you try reproducing and confirm this bug is still happening?

@ishpaul777
Copy link
Contributor

ishpaul777 commented May 4, 2024

I can reproduce the issue but only when using the onscreen keyboard, not when using the hardware keyboard which is most real user going to use.

@StaniMilko
Copy link
Contributor

StaniMilko commented May 6, 2024

Proposal

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

Chat - Emojis auto-selected after sending a message with a space before choosing from composer.
This issue is reproducible when sending message with send button, not with enter key.

What is the root cause of that problem?

When we type in composer, selection is updated.
If we send message with send button, composer is cleared but the value of selection is not reset(it remains as something like {start: 3, end: 3, positionX: 33, positionY: 2}).
So if we add emoji after that, emoji is auto-selected.

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

We can reset selection when sending message.
Set selection with initial value

We can add setSelection({start: 0, end: 0}) in this function

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label May 6, 2024
Copy link

melvin-bot bot commented May 6, 2024

📣 @StaniMilko! 📣
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. Make sure you've read and understood the contributing guidelines.
  2. 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.
  3. 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.
  4. 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>

@lschurr
Copy link
Contributor

lschurr commented May 6, 2024

Hi @ishpaul777 - Could you check the proposal here?

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

lschurr commented May 6, 2024

Not overdue. I'm not sure why Melvin keeps adding that.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 6, 2024
@lschurr
Copy link
Contributor

lschurr commented May 9, 2024

Bump on this @ishpaul777

@melvin-bot melvin-bot bot removed the Overdue label May 9, 2024
@brunovjk
Copy link
Contributor

brunovjk commented May 9, 2024

Proposal

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

Inconsistent behavior exists between sending chat messages with the Enter key versus the Send button.
After sending a message with the Enter key, we correctly clears the composer selection, preventing auto-selection of emojis. The Send button doesn't perform this action, leading to the unexpected auto-selection of an emoji when the composer is re-focused.

What is the root cause of that problem?

Lack of selection clearing when using the Send button to submit a message:

  • Enter Key Behavior
    • The RNMarkdownTextInput component's onSelectionChange event is triggered.
    • The addCursorPositionToSelectionChange function resets the composer selection, preventing the auto-select issue.
  • Send Button Behavior
    • Currently, no event explicitly resets the composer selection, leading to the auto-select issue.

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

To address this, we need to introduce a mechanism to reset the composer selection after the Send button is used.
Add code within the handleSendMessage function to explicitly reset the text input selection after the message is sent. This might involve using refs to access the underlying input element and manipulate its selection.

What alternative solutions did you explore? (Optional)

Find a way to utilize the onSelectionChange event or a similar event handler in conjunction with the Send button. This might involve adding a hidden input element that can trigger the selection reset logic.

@ishpaul777
Copy link
Contributor

Sorry for delay!

@StaniMilko @brunovjk Thanks for your proposals, It makes sense to me that selection needs to reset after sending message 👍

@StaniMilko @brunovjk Can you please provide branch for testing before i select 🙇

@StaniMilko
Copy link
Contributor

@ishpaul777
Currently, I can't create branch due to problem on my side.
I've updated proposal with details. Sorry for inconvenience.

Copy link

melvin-bot bot commented May 10, 2024

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

@brunovjk
Copy link
Contributor

I think the SendButton could emit some event. Still working on it.

@ishpaul777
Copy link
Contributor

ishpaul777 commented May 10, 2024

Thanks for updating proposal @StaniMilko, your proposal looks good but i think instead of accessing setSelection directly we can add setSelection({start: 0, end: 0}) inside prepareCommentAndResetComposer that should work fine i think

@StaniMilko
Copy link
Contributor

@ishpaul777
Thank you for your check.
I've update proposal covering your suggestion.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels May 14, 2024
@StaniMilko
Copy link
Contributor

Hi, @ishpaul777
I've created PR.

@StaniMilko
Copy link
Contributor

@techievivek cc: @lschurr
I can't sure if merge freeze is over. I can see some other commits merged recently.

Copy link

melvin-bot bot commented May 29, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 30, 2024
@melvin-bot melvin-bot bot changed the title [$250] Chat - Emojis auto-selected after sending a message with a space before choosing from composer [HOLD for payment 2024-06-06] [$250] Chat - Emojis auto-selected after sending a message with a space before choosing from composer May 30, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 30, 2024
Copy link

melvin-bot bot commented May 30, 2024

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

Copy link

melvin-bot bot commented May 30, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.77-11 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-06-06. 🎊

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

Copy link

melvin-bot bot commented May 30, 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:

  • [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
  • [@ishpaul777] 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:
  • [@ishpaul777] 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:
  • [@ishpaul777] Determine if we should create a regression test for this bug.
  • [@ishpaul777] 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.
  • [@lschurr] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@lschurr
Copy link
Contributor

lschurr commented Jun 6, 2024

Payment summary:

  • Contributor: $250 @StaniMilko (need Upwork profile to send offer)
  • Contributor+: $250 @ishpaul777 (paid in Upwork)

@lschurr
Copy link
Contributor

lschurr commented Jun 6, 2024

@StaniMilko - Can you link your Upwork profile here so that I can send an offer for payment?

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 6, 2024
@lschurr
Copy link
Contributor

lschurr commented Jun 7, 2024

Bump on this @StaniMilko

@melvin-bot melvin-bot bot added the Overdue label Jun 10, 2024
@lschurr
Copy link
Contributor

lschurr commented Jun 10, 2024

This is done - I'm just waiting @StaniMilko's Upwork profile so that I can send an offer and pay.

@lschurr lschurr added the Weekly KSv2 label Jun 10, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jun 10, 2024
@lschurr lschurr removed the Daily KSv2 label Jun 10, 2024
@lschurr
Copy link
Contributor

lschurr commented Jun 11, 2024

I'm closing this since the bug is fixed. @StaniMilko - please comment with your Upwork profile for payment.

@lschurr lschurr closed this as completed Jun 11, 2024
@StaniMilko
Copy link
Contributor

@lschurr
Sorry for delay. Can I get payment now?

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

Copy link

melvin-bot bot commented Aug 17, 2024

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

@lschurr
Copy link
Contributor

lschurr commented Aug 19, 2024

@lschurr
Copy link
Contributor

lschurr commented Aug 19, 2024

Paid in Upwork :)

@StaniMilko
Copy link
Contributor

@lschurr
Thank you very much.

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants