Skip to content

[WAITING ON CHECKLIST][$500] Chat - Spanish emoji text is not converted to emoji even on focus on language change #28265

Closed

Description

@kbecciv

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 and ensure language is English
  2. Open any report
  3. Write any Spanish emoji text eg: Hello :rosa: (rosa is for rose emoji)
  4. Change language to Spanish
  5. Revisit the same report as step 2, focus on composer and observe that even after focus, emoji text is not changed to emoji
  6. Add any text or space, now it will be changed

Expected Result:

App should change the Spanish emoji text to emoji when language changed to Spanish and composer is focused

Actual Result:

App does not change the Spanish emoji text to emoji even when language changed to Spanish and composer is focused

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

spanish.text.to.emoji.not.working.IOS.native.safari.1.mov
spanish.emoji.text.not.converted.to.emoji.android.native.chrome.mp4
Screen_Recording_20230926_125040_Chrome.1.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a987896441b75bec
  • Upwork Job ID: 1706679497712611328
  • Last Price Increase: 2023-10-17
  • Automatic offers:
    • situchan | Reviewer | 27351589
    • s-alves10 | Contributor | 27351590
    • dhanashree-sawant | Reporter | 27351593

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 26, 2023
  2. changed the title [-]Chat - Spanish emoji text is not converted to emoji even on focus on language change[/-] [+][$500] Chat - Spanish emoji text is not converted to emoji even on focus on language change[/+] on Sep 26, 2023
  3. melvin-bot commented on Sep 26, 2023

    @melvin-bot

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

  4. melvin-bot commented on Sep 26, 2023

    @melvin-bot
  5. melvin-bot commented on Sep 26, 2023

    @melvin-bot

    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
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 26, 2023
  7. melvin-bot commented on Sep 26, 2023

    @melvin-bot

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

  8. ikevin127 commented on Sep 26, 2023

    @ikevin127
    Contributor

    Proposal

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

    App should change the Spanish emoji text to emoji when language changed to Spanish and composer is focused.

    What is the root cause of that problem?

    The cause of the problem comes from the ComposerWithSuggestions.js component onFocus event which does not update the composer text like it's usually done via the updateComment function after the locales are changed.

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

    Within the ComposerWithSuggestions.js component I created the focusUpdateComment function which updates the composer to render emojis on input focus then continues with the onFocus function passing the focus event to it:

         const focusUpdateComment = useCallback(e => {
            updateComment(commentRef.current, true);
            onFocus(e);
        }, [onFocus, updateComment]);
    

    What alternative solutions did you explore? (Optional)

    N/A

    Videos

    android.mp4
    chrome.android.mp4
    ios.mp4
    safari.ios.mp4
  9. dummy-1111 commented on Sep 26, 2023

    @dummy-1111
    Contributor

    Proposal

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

    Spanish emoji text is not converted to emoji even on focus after language is changed from English to Spanish
    This issue happens on small-screen devices and for editing composer as well

    What is the root cause of that problem?

    On wide-screen devices, we have SilentCommentUpdater component here

    This SilentCommentUpdater replaces emoji text to emoji when locale is changed

    But this is not the case on small screen devices.
    When language is changed, SilentCommentUpdater component isn't on the screen. When this component is mounted, the locale was changed already and the useEffect callback isn't called. In addition, in onFocus event handler, we don't have any code for doing this.

    This is the root cause

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

    We need to change the onFocus event handler

    For the main composer, replace the below code

    with

            onFocus={(e) => {
                updateComment(value);
                onFocus(e);
            }}
    

    For the editing composer, insert the following code before this line

            updateDraft(draft);
    

    This works as expected for both composers

    Result
    28265.mp4

    What alternative solutions did you explore? (Optional)

    It looks ugly updating the comment on focus
    We can update on mount
    Add the on-mount effect to the silent updater

        useEffect(() => {
            updateComment(comment);
        }, []);
    

    Do the same for ReportActionItemMessageEdit

  10. kevdez commented on Sep 26, 2023

    @kevdez

    Hello, this comment is for just trying to trigger the melvin-bot.

  11. melvin-bot commented on Sep 26, 2023

    @melvin-bot

    📣 @MintyAtmosphere! 📣
    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>
    
  12. 75 remaining items

  13. jliexpensify commented on Nov 8, 2023

    @jliexpensify
    Contributor

    Everyone is paid and job closed, @situchan please complete the checklist when you get online - thanks!

  14. changed the title [-][WAITING ON CHECKLIST] [HOLD for payment 2023-11-06] [$500] Chat - Spanish emoji text is not converted to emoji even on focus on language change[/-] [+][WAITING ON CHECKLIST][$500] Chat - Spanish emoji text is not converted to emoji even on focus on language change[/+] on Nov 8, 2023
  15. situchan commented on Nov 8, 2023

    @situchan
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: N/A
    • 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: N/A
    • 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: N/A
    • Determine if we should create a regression test for this bug.
    • 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.

    I don't propose regression test as it's edge case and minor inconsistency issue.

  16. situchan commented on Nov 8, 2023

    @situchan
    Contributor

    This is still eligible for bonus

  17. jliexpensify commented on Nov 8, 2023

    @jliexpensify
    Contributor

    @situchan can you point me to the GH comment from Melvin regarding the bonus?

    I did post the summary here and no-one corrected me.

  18. situchan commented on Nov 9, 2023

    @situchan
    Contributor

    Maybe automation seemed broken.

    Here's timeline:
    Assign: #28265 (comment) (Oct 24)
    Merge: #30301 (comment) (Oct 26)

  19. jliexpensify commented on Nov 9, 2023

    @jliexpensify
    Contributor

    Ok thanks, I'll need to create a new job and rehire you both.

  20. jliexpensify commented on Nov 9, 2023

    @jliexpensify
    Contributor

    Bonus payment: https://www.upwork.com/jobs/~016d6e54058c1f4ebc

    Invited @s-alves10 and @situchan

  21. situchan commented on Nov 9, 2023

    @situchan
    Contributor

    @jliexpensify can you please use this contract?

    Edit: Ah I see it's ended. Will accept new offer

  22. jliexpensify commented on Nov 9, 2023

    @jliexpensify
    Contributor

    No, it's closed
    image

  23. dummy-1111 commented on Nov 9, 2023

    @dummy-1111
    Contributor

    @jliexpensify

    Offer accepted. Thanks

  24. jliexpensify commented on Nov 9, 2023

    @jliexpensify
    Contributor

    Paid both of you, closing job now!

  25. jliexpensify commented on Nov 9, 2023

    @jliexpensify
    Contributor

    @situchan @s-alves10 I just want to point out that you may not have been eligible for an urgency bonus for this job: we did recently cut this. That's why there may have not been a Melvin ping about it.

    Anyway, the bonus has been paid but moving forward, I just wanted to point out this might be the reason why.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions