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
[HOLD for payment 2024-02-07] [$2000] Chat - Whitespace is not added after an emoji while inserting via native keyboard #23658
Whitespace is added only if emoji is added via emoji picker in composer and not while added using native keyboard.
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.44-2 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
The new function would be a wrapper around this.updateComment. It detects if the event is an emoji insertion and appends a trailing space (default behavior of this.replaceSelectionWithText). Subsequently, it passes on the processed comment.
Please re-state the problem that we are trying to solve in this issue.
Experience of inserting emoji in chat is not unified!
What is the root cause of that problem?
So I will open a new discussion in slack. @mallenexpensify proposed the space but this is only true when emoji is written with :emoji, when the emoji is picked from the picker menu in slack it is written without trail space. We would have to write custom code to "process" the written emoji and set a space in the onChange of the composer to unify but my proposal is to set the experience same as slack!
What changes do you think we should make in order to solve the problem?
I would remove the trail from onEmojiSelected in ReportActionCompose and ReportActionItemMessageEdit since the implementation of :emoji already includes the space to unify the experience with slack and leave the EmojiPickerMenu to behave as the native one. Same as slack.
Video of solution working same as slack with native menu and EmojiPickerMenu:
working.as.slack.mp4
What alternative solutions did you explore? (Optional)
Update the onChange handler of Composer component, use a regex to validate if there is an emoji and include the space after it is included via native picker. Still I think altering native behavior wouldn't be expected but if it is desired we can implement the custom code!
changed the title [-]Chat - Whitespace is not added after an emoji while inserting via native keyboard[/-][+][$1000] Chat - Whitespace is not added after an emoji while inserting via native keyboard[/+]on Jul 27, 2023
Sorry about that @aswin-s! I adjusted the payment to be $250, and will update the payment summary above. You should have received both payments successfully, totaling $2,250 👍
@aswin-s (reporter) — paid $250 via Upwork ✅ @aswin-s (contributor) — paid $1000 via Upwork ✅ (50% cut due to regression) @mollfpr (C+) — to be paid $1000 via NewDot (50% cut due to regression)
@CortneyOfstad@situchan Quick question. The regression was caught during staging itself and fix was raised the very next day. So payment would be deducted even if developer fixes it even before it hits PROD? Just asking so that I can be more careful next time.
@aswin-s Thanks for asking! Each error in proposed PRs will carry different weights based on the type of error and the impact it would have, so in some cases (like this one) yes, it will cause a reduction in payment.
There are some exceptions. i.e. regressions penalties won't apply if already discussed as out of scope in PR.
And too much efforts working on PR.
i.e. Ideal Nav PR caused so many regressions but it was super large and reviewers won't get payment deducted.
But usually penalty is applied as long as bug is caught after PR is merged, whether in main branch, staging, or production
Activity
melvin-bot commentedon Jul 26, 2023
Triggered auto assignment to @CortneyOfstad (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 26, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)samh-nl commentedon Jul 26, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Whitespace is not added after an emoji while inserting via native keyboard
What is the root cause of that problem?
No logic has been implemented for automatically adding whitespace after inserting an emoji via the native keyboard.
What changes do you think we should make in order to solve the problem?
In
ReportActionCompose, we perform these changes:this.updateComment. It detects if the event is an emoji insertion and appends a trailing space (default behavior ofthis.replaceSelectionWithText). Subsequently, it passes on the processed comment.shouldDebounceSaveComment(default false) argument tothis.replaceSelectionWithTextto pass tothis.updateComment.This change would also be applied to
ReportActionItemMessageEdit.What alternative solutions did you explore? (Optional)
N/A
daordonez11 commentedon Jul 26, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Experience of inserting emoji in chat is not unified!
What is the root cause of that problem?
So I will open a new discussion in slack. @mallenexpensify proposed the space but this is only true when emoji is written with :emoji, when the emoji is picked from the picker menu in slack it is written without trail space. We would have to write custom code to "process" the written emoji and set a space in the
onChangeof the composer to unify but my proposal is to set the experience same as slack!What changes do you think we should make in order to solve the problem?
I would remove the trail from
onEmojiSelectedinReportActionComposeandReportActionItemMessageEditsince the implementation of :emoji already includes the space to unify the experience with slack and leave the EmojiPickerMenu to behave as the native one. Same as slack.Video of solution working same as slack with native menu and EmojiPickerMenu:
working.as.slack.mp4
What alternative solutions did you explore? (Optional)
Update the
onChangehandler ofComposercomponent, use a regex to validate if there is an emoji and include the space after it is included via native picker. Still I think altering native behavior wouldn't be expected but if it is desired we can implement the custom code![-]Chat - Whitespace is not added after an emoji while inserting via native keyboard[/-][+][$1000] Chat - Whitespace is not added after an emoji while inserting via native keyboard[/+]melvin-bot commentedon Jul 27, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0188d7c4a5e13254b6
melvin-bot commentedon Jul 27, 2023
Current assignee @CortneyOfstad is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jul 27, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (
External)244 remaining items
aswin-s commentedon Feb 7, 2024
@CortneyOfstad The issue was reported before the bounty for issues were reduced to 50$.
CortneyOfstad commentedon Feb 7, 2024
Regression test listed here 👍
CortneyOfstad commentedon Feb 7, 2024
Sorry about that @aswin-s! I adjusted the payment to be $250, and will update the payment summary above. You should have received both payments successfully, totaling $2,250 👍
situchan commentedon Feb 7, 2024
We had to revert first PR due to regressions: #31006 #30950 #30983
2nd PR also caused regression but we closed it as minor.
Hope this info won't affect payment (no other contributors were involved so no overpaid) but worth mentioning.
CortneyOfstad commentedon Feb 7, 2024
Shoot — that does reduce the payment and it was already completed 🙃 Going to post in Open-Source on how to get this corrected.
CortneyOfstad commentedon Feb 7, 2024
Alright, @aswin-s I requested a refund of 50% ($1000) as the contributor. Please let me know as soon as you complete this. Thank you!
aswin-s commentedon Feb 7, 2024
@CortneyOfstad Let me know if I can do anything from my end
aswin-s commentedon Feb 7, 2024
Thank you
CortneyOfstad commentedon Feb 7, 2024
Thank you so much @aswin-s — I greatly appreciate it!
CortneyOfstad commentedon Feb 7, 2024
Alright — here is the FINAL payment summary 😂
Payment Summary
@aswin-s (reporter) — paid $250 via Upwork ✅
@aswin-s (contributor) — paid $1000 via Upwork ✅ (50% cut due to regression)
@mollfpr (C+) — to be paid $1000 via NewDot (50% cut due to regression)
aswin-s commentedon Feb 7, 2024
@CortneyOfstad @situchan Quick question. The regression was caught during staging itself and fix was raised the very next day. So payment would be deducted even if developer fixes it even before it hits PROD? Just asking so that I can be more careful next time.
CortneyOfstad commentedon Feb 7, 2024
@aswin-s Thanks for asking! Each error in proposed PRs will carry different weights based on the type of error and the impact it would have, so in some cases (like this one) yes, it will cause a reduction in payment.
situchan commentedon Feb 7, 2024
There are some exceptions. i.e. regressions penalties won't apply if already discussed as out of scope in PR.
And too much efforts working on PR.
i.e. Ideal Nav PR caused so many regressions but it was super large and reviewers won't get payment deducted.
But usually penalty is applied as long as bug is caught after PR is merged, whether in main branch, staging, or production
JmillsExpensify commentedon Feb 7, 2024
$1,000 approved for @mollfpr based on this summary.