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 2023-08-16] [$1000] IOS - Unable to send message after copying #24147

Closed
1 of 6 tasks
mvtglobally opened this issue Aug 4, 2023 · 56 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@mvtglobally
Copy link

mvtglobally commented Aug 4, 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 app
  2. send any message
  3. Copy message to clipboard
  4. paste and try to send

Expected Result:

User should be able to send a message

Actual Result:

User is unable to send a message

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.50-0
Reproducible in staging?: Y
Reproducible in production?: N
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

RPReplay_Final1691106477.MP4

Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0178ff1caa2420bb2c
  • Upwork Job ID: 1687566252792942592
  • Last Price Increase: 2023-08-04
@mvtglobally mvtglobally added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 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

@OSBotify
Copy link
Contributor

OSBotify commented Aug 4, 2023

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 2023

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

@MonilBhavsar
Copy link
Contributor

Reproducible on physical iOS device

@lukemorawski
Copy link
Contributor

taking a look at this

@slafortune
Copy link
Contributor

Any update on this @lukemorawski ?

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label Aug 4, 2023
@melvin-bot melvin-bot bot changed the title IOS - Unable to send message after copying [$1000] IOS - Unable to send message after copying Aug 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 2023

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

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

melvin-bot bot commented Aug 4, 2023

Current assignee @slafortune is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 2023

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

@kodcuserkan
Copy link

Any updates here?

@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 2023

📣 @kodcuserkan! 📣
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. 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.
  2. 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.
  3. 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
Copy link

melvin-bot bot commented Aug 4, 2023

📣 @eruqul1111! 📣
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. 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.
  2. 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.
  3. 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>

@Krishna2323
Copy link
Contributor

Krishna2323 commented Aug 4, 2023

Proposal

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

IOS - Unable to send message after copying

What is the root cause of that problem?

This is a known issue with React Native's TextInput, particularly on iOS. When text is pasted into the input, the onChangeText and onChange events may not always get triggered as expected. This can lead to inconsistencies when trying to keep track of the text input's value in your component's state.

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

After trying many hacks I found that calling onBlur triggers the onChangeText callback with the pasted text, so we can call textInput.blur() and textInput.focus() on onSelectionChange to solve this problem.

Changes:

    onSelectionChange(e) {
    
        // NEW LINES START   
        if (Platform.OS === 'ios' && !this.state.value) 
            this.setState({isBlurIntentional: true}, () =>
                this.textInput.blur();
                this.textInput.focus();
                setTimeout(() => {
                    this.setState({isBlurIntentional: false});
                }, 100);
            });
        }
         // NEW LINES END
         
      LayoutAnimation.configureNext(LayoutAnimation.create(50, LayoutAnimation.Types.easeInEaseOut, 
      LayoutAnimation.Properties.opacity));
        this.setState({selection: e.nativeEvent.selection});
        if (!this.state.value || e.nativeEvent.selection.end < 1) {
            this.resetSuggestions();
            this.shouldBlockEmojiCalc = false;
            this.shouldBlockMentionCalc = false;
            return;
        }
        this.calculateEmojiSuggestion();
        this.calculateMentionSuggestion();
    }

Explanation:

  1. We are only calling the using .blur() & .focus() if the device is an IOS device since it is a IOS specific issue and then we are checking if the input is empty because we don't want to run the function on every change.
  2. We are adding a new state called isBlurIntentional because we don't want to trigger the onBlur callback on this specific event as it will create a flickering once.

Fixed:

fix_demo.mp4

@melvin-bot melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels Aug 4, 2023
@pradeepmdk
Copy link
Contributor

pradeepmdk commented Aug 4, 2023

Proposal

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

IOS - Unable to send a message after copying
Not only copy-pasting after clearing the input when we type the first entry onChangeText event is not trigger

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-08-05.at.05.14.00.mp4

What is the root cause of that problem?

This is a known issue with React Native's TextInput on multiline is true, particularly on iOS.

on multiline after clearing the textbox on the first entry not updating via onChangeText

facebook/react-native#37784

This issue has occurred from v0.71.8 below changes.
facebook/react-native@a804c0f

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

we need to do a patch fix
https://github.com/AudiusProject/audius-client/pull/3622/files

Result After updating

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-08-05.at.05.05.20.mp4

@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

📣 @pradeepmdk You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

🎯 ⚡️ Woah @mananjadhav / @pradeepmdk, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @pradeepmdk got assigned: 2023-08-07 12:02:14 Z
  • when the PR got merged: 2023-08-07 12:03:47 UTC

On to the next one 🚀

@MonilBhavsar
Copy link
Contributor

@Beamanator Beamanator removed the DeployBlockerCash This issue or pull request should block deployment label Aug 7, 2023
@Beamanator
Copy link
Contributor

PR in staging, @MonilBhavsar confirmed it's working! No longer a blocker 👍

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Aug 7, 2023
@pradeepmdk
Copy link
Contributor

📣 @pradeepmdk You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing 📖

I applied the job in upwork.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 9, 2023
@melvin-bot melvin-bot bot changed the title [$1000] IOS - Unable to send message after copying [HOLD for payment 2023-08-16] [$1000] IOS - Unable to send message after copying Aug 9, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 9, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 9, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.51-2 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 2023-08-16. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 9, 2023

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:

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

@pradeepmdk
Copy link
Contributor

@MonilBhavsar I have applied to the Upwork job, but didn't get hired.

@mananjadhav
Copy link
Collaborator

@slafortune Can you please help with hiring @pradeepmdk on Upwork?

@pradeepmdk
Copy link
Contributor

@slafortune any update for me

@mananjadhav
Copy link
Collaborator

This was more of a bug due to RN dependency, but I think could've got through this when upgrading the RN version? Considering this was deploy blocker, we did catch this in QA, and hence I feel we don't need any regression tests here.

@slafortune Can you please add the payment summary here? and also hire @pradeepmdk on Upwork?

@slafortune
Copy link
Contributor

slafortune commented Aug 16, 2023

External issue reporter - applause, no payment needed
Contributor that fixed the issue - @pradeepmdk, $1500 - PD
Contributor+ that helped on the issue and/or PR - @mananjadhav $1500 require payment (Eligable for Manual Requests)

🎉 Speed bonus given - @pradeepmdk got assigned: 2023-08-07 12:02:14 Z / when the PR got merged: 2023-08-07 12:03:47 UTC

@pradeepmdk
Copy link
Contributor

@slafortune offer accepted.
in the offer only $1000.

@mananjadhav
Copy link
Collaborator

@pradeepmdk Offer is sent out for $1000 for the contract amount, and $500 will be paid out as the bonus during the payout.

@slafortune
Copy link
Contributor

@mananjadhav , you requested payment via NewDot, right?

@mananjadhav
Copy link
Collaborator

Yes @slafortune. I've requested the payment via NewDot. But I think we're supposed to keep the issue open until @JmillsExpensify @anmurali approves and comments here?

@slafortune
Copy link
Contributor

Thanks! Yes, I'll leave it open - just wanted to verify you had requested that 👍

@JmillsExpensify
Copy link

Reviewed the details for @mananjadhav. This is approved for payment in NewDot based on the BZ summary above.

@mananjadhav
Copy link
Collaborator

Can we close this? @slafortune

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. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

16 participants