You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[WAITING ON CHECKLIST][$500] Chat - Spanish emoji text is not converted to emoji even on focus on language change #28265
Write any Spanish emoji text eg: Hello :rosa: (rosa is for rose emoji)
Change language to Spanish
Revisit the same report as step 2, focus on composer and observe that even after focus, emoji text is not changed to emoji
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
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
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:
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
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?
📣 @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:
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.
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.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
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
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.
@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.
Activity
[-]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[/+]melvin-bot commentedon Sep 26, 2023
Triggered auto assignment to @jliexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 26, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01a987896441b75bec
melvin-bot commentedon Sep 26, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Sep 26, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)ikevin127 commentedon Sep 26, 2023
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.jscomponentonFocusevent which does not update the composer text like it's usually done via theupdateCommentfunction after the locales are changed.What changes do you think we should make in order to solve the problem?
Within the
ComposerWithSuggestions.jscomponent I created thefocusUpdateCommentfunction which updates the composer to render emojis on input focus then continues with theonFocusfunction passing the focus event to it:What alternative solutions did you explore? (Optional)
N/A
Videos
android.mp4
chrome.android.mp4
ios.mp4
safari.ios.mp4
dummy-1111 commentedon Sep 26, 2023
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
SilentCommentUpdaterreplaces emoji text to emoji when locale is changedApp/src/pages/home/report/ReportActionCompose/SilentCommentUpdater.js
Line 58 in cfad43f
But this is not the case on small screen devices.
When language is changed,
SilentCommentUpdatercomponent isn't on the screen. When this component is mounted, the locale was changed already and theuseEffectcallback isn't called. In addition, inonFocusevent 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
onFocusevent handlerFor the main composer, replace the below code
App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js
Line 504 in cfad43f
with
For the editing composer, insert the following code before this line
App/src/pages/home/report/ReportActionItemMessageEdit.js
Line 385 in cfad43f
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
Do the same for
ReportActionItemMessageEditkevdez commentedon Sep 26, 2023
Hello, this comment is for just trying to trigger the melvin-bot.
melvin-bot commentedon Sep 26, 2023
📣 @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:
Format:
75 remaining items
jliexpensify commentedon Nov 8, 2023
Everyone is paid and job closed, @situchan please complete the checklist when you get online - thanks!
[-][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[/+]situchan commentedon Nov 8, 2023
I don't propose regression test as it's edge case and minor inconsistency issue.
situchan commentedon Nov 8, 2023
This is still eligible for bonus
jliexpensify commentedon Nov 8, 2023
@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.
situchan commentedon Nov 9, 2023
Maybe automation seemed broken.
Here's timeline:
Assign: #28265 (comment) (Oct 24)
Merge: #30301 (comment) (Oct 26)
jliexpensify commentedon Nov 9, 2023
Ok thanks, I'll need to create a new job and rehire you both.
jliexpensify commentedon Nov 9, 2023
Bonus payment: https://www.upwork.com/jobs/~016d6e54058c1f4ebc
Invited @s-alves10 and @situchan
situchan commentedon Nov 9, 2023
@jliexpensify can you please use this contract?
Edit: Ah I see it's ended. Will accept new offer
jliexpensify commentedon Nov 9, 2023
No, it's closed

dummy-1111 commentedon Nov 9, 2023
@jliexpensify
Offer accepted. Thanks
jliexpensify commentedon Nov 9, 2023
Paid both of you, closing job now!
jliexpensify commentedon Nov 9, 2023
@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.