-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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-12-15] [$500] Chat - A new line is created in the composer after emoji selection with Tab key #31210
Comments
Triggered auto assignment to @anmurali ( |
Job added to Upwork: https://www.upwork.com/jobs/~015985b1c6b3729714 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.A new line is created in the composer when pressing enter key after emoji is selected with Tab key in EmojiPicker What is the root cause of that problem?App/src/components/EmojiPicker/EmojiPickerMenu/index.js Lines 306 to 314 in 3939bea
As you can see in the above code segment, we don't prevent default action of 'Enter' key event This is the root cause What changes do you think we should make in order to solve the problem?We need to prevent default action of 'Enter' key Add the following code above this line
This works fine Result31210.mp4What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Selecting an emoji using keyboard enter will add the emoji with a new line to the composer. What is the root cause of that problem?I don't know the exact root cause of it, but here is what I found. This issue happens after the When we select an emoji, it will call App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.js Lines 319 to 330 in f0fb7a8
The function will replace the current selection with the I also thought that the new line was added because the ENTER key event is not consumed by any element, so the composer input consumes it. But the weird thing is, if I remove the There might be some more details to the issue, but this is what I only found. What changes do you think we should make in order to solve the problem?I agree that the Because pressing enter on the emoji item already triggers the emoji
This way, the ENTER key will be consumed by the emoji item pressable. currently, the emoji |
Agree, this behavior seems a bit weird, which requires some time for review. |
App/src/components/EmojiPicker/EmojiPickerMenu/index.js Lines 306 to 312 in 82ee577
The root cause for this issue is that we are calling I think our code should lean towards standardization, so it would be better to remove the a demo video: target-shift.mp4Additionally, there is a double-input problem with the same root cause, but I am not yet certain whether there is a related issue reported. : ) double-input.mp4 |
I'm not sure why. Preventing default action is widely used to customize the default action of elements. And obviously, we should be able to select emoji by Expecting your feedback on this |
Ah, this is the case that would fail if we remove the Enter key listener because when we search, the first item is highlighted, but not focused. |
@s-alves10, eh, I didn't mean to remove the |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
ProposalPlease re-state the problem that we are trying to solve in this issue.A new line is added if user open emoji picker and press tab to choose emoji then press enter to select/insert emoji in compose box. What is the root cause of that problem?App/src/components/EmojiPicker/EmojiPicker.js Lines 97 to 108 in d985a0e
When user select emoji (in this case by pressing enter) the hideEmojiPicker(false) will hide the emoji popover and will execute onModalHide: App/src/pages/home/report/ReportActionCompose/ReportActionCompose.js Lines 433 to 435 in d985a0e
which is What changes do you think we should make in order to solve the problem?We can move the hideEmojiPicker(false); below onEmojiSelected.current(emoji, emojiObject); to hide the popover later and to insert the emoji first. The code could be: const selectEmoji = (emoji, emojiObject) => {
// Prevent fast click / multiple emoji selection;
// The first click will hide the emoji picker by calling the hideEmojiPicker() function
if (!isEmojiPickerVisible) {
return;
}
- hideEmojiPicker(false);
if (_.isFunction(onEmojiSelected.current)) {
onEmojiSelected.current(emoji, emojiObject);
}
+ hideEmojiPicker(false);
};
|
@ntdiary have we reviewed the above proposal? Are you ready to pick one or are we still waiting for better proposals? |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.9-5 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-12-15. 🎊 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.
For reference, here are some details about the assignees on this issue:
|
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:
|
@flodnv, @ntdiary, @anmurali, @s-alves10 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
It's just a edge case and a minor fix, we've already added comments to the code, so I don't think we need to create a regression test. :) |
Agreed 👍 @anmurali please issue payments 🙇 |
@flodnv, @ntdiary, @anmurali, @s-alves10 Eep! 4 days overdue now. Issues have feelings too... |
@flodnv, @ntdiary, @anmurali, @s-alves10 Still overdue 6 days?! Let's take care of this! |
@flodnv, @ntdiary, @anmurali, @s-alves10 10 days overdue. I'm getting more depressed than Marvin. |
@flodnv, @ntdiary, @anmurali, @s-alves10 12 days overdue. Walking. Toward. The. Light... |
Paid. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.98.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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
No new line is created in the composer after emoji selection.
Actual Result:
A new line is created in the composer after emoji selection.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6271766_1699647650902.20231111_031650.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: