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 https://github.com/Expensify/App/issues/27672] [$500] Web - App becomes unresponsive on selecting and pasting same emoji in composer #28035

Closed
6 tasks
kbecciv opened this issue Sep 22, 2023 · 15 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Sep 22, 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!


Action Performed:

  1. Open the app
  2. Open any report
  3. From emoji picker, select any emoji eg: 🍩
  4. Copy the emoji text of emoji used in step 3 eg: copy ':doughnut' and colon after doughnut (easy way to copy the text is react with that emoji on any message, right click on reaction and copy the text from popup)
  5. Select the emoji in composer and paste the copied text, observe that now app becomes unresponsive

Expected Result:

App should not become unresponsive by any action

Actual Result:

App becomes unresponsive when we paste emoji text on same emoji selected in composer

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

unresponsive.app.on.selecting.emoji.and.pasting.emoji.text.over.it.mp4
Recording.4695.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695225569076869

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018a748087cda69421
  • Upwork Job ID: 1705260542736433152
  • Last Price Increase: 2023-09-22
@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 Sep 22, 2023
@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Sep 22, 2023

Proposal

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

App becomes unresponsive on selecting and pasting same emoji in composer

What is the root cause of that problem?

When we get the cursor position here

const remainder = ComposerUtils.getCommonSuffixLength(commentRef.current, newComment);

This loop run infinite, because the two values are the same, and no break for this

while (str1[str1.length - 1 - i] === str2[str2.length - 1 - i]) {
i++;
}
return i;

while (str1[str1.length - 1 - i] === str2[str2.length - 1 - i]) { i++}
// The infinite value happend when i >= str.length 
str[str.length - 1 - i]
str[100 - 1 - 100]
str[-1] = undefined
while (undefined === undefined) { i++} // infinite loop

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

We need to break the loop when comparison end by adding this condition to while str1.length > i && str2.length > i && or simply Math.min(str1.length, str2.length) > i

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot changed the title Web - App becomes unresponsive on selecting and pasting same emoji in composer [$500] Web - App becomes unresponsive on selecting and pasting same emoji in composer Sep 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 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 Sep 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 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

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

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

@ahmedGaber93
Copy link
Contributor

I think this issue may be will not be reproduced after fix #27672

@rameshvoodi
Copy link

Hello @kbecciv can i work on these issues even if didnt submit proposal in upwork, is there any bounty paid?

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

📣 @rameshvoodi! 📣
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>

@melvin-bot melvin-bot bot added the Overdue label Sep 25, 2023
@narefyev91
Copy link
Contributor

@Christinadobrzyn hey - can you please put on hold this one - to wait a potential fix from this issue #27672

@melvin-bot melvin-bot bot removed the Overdue label Sep 25, 2023
@bfitzexpensify bfitzexpensify changed the title [$500] Web - App becomes unresponsive on selecting and pasting same emoji in composer [HOLD https://github.com/Expensify/App/issues/27672] [$500] Web - App becomes unresponsive on selecting and pasting same emoji in composer Sep 26, 2023
@bfitzexpensify
Copy link
Contributor

Updated the title to hold for #27672

@melvin-bot melvin-bot bot added the Overdue label Sep 28, 2023
@bfitzexpensify
Copy link
Contributor

#27672 has been merged, so we should hopefully be good to check back on this early next week

@melvin-bot melvin-bot bot removed the Overdue label Sep 28, 2023
@Christinadobrzyn Christinadobrzyn removed their assignment Sep 28, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@bfitzexpensify
Copy link
Contributor

Waiting for #27672 to be deployed.

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2023
@bfitzexpensify
Copy link
Contributor

#27672 is live, and it makes copying the emoji (step 4 in the reproduction steps) no longer possible, so this isn't doesn't exist any more.

It looks like the report for #27672 was made prior to this, so I'm going to consider this closed out with no further action required.

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

6 participants