-
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-11-09] [$500] Chat - Focus on edit even when reaction emoji picker is opened #30119
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue.Open emojiPicker while another emojiPicker is open the edit composer is focus rather than emojiPicker search input What is the root cause of that problem?We have two conflicts behavior at the same time when react emojiPicker open while composer emojiPicker is visible.
What changes do you think we should make in order to solve the problem?we should stop focus composer emojiPicker if the react emojiPicker will show. App/src/pages/home/report/ReportActionItemMessageEdit.js Lines 430 to 433 in 15aee9d
onModalHide={() => {
InteractionManager.runAfterInteractions(() => {
// check if any emojiPicker is open before focus the input
if (!EmojiPickerAction.isEmojiPickerVisible()) {
setIsFocused(true);
focus(true);
}
})
}} What alternative solutions did you explore? (Optional)N/A |
Job added to Upwork: https://www.upwork.com/jobs/~016e9799a4fab4eacb |
Triggered auto assignment to @twisterdotcom ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @cubuspl42 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Edit composer gets focused when open What is the root cause of that problem?When open The problem is in App/src/libs/focusWithDelay.ts Lines 16 to 31 in 6031f3e
So the This is the root cause What changes do you think we should make in order to solve the problem?This issue happens for the main composer as well. We need to fix both
With the second solution, the search input would flicker because it gets blurred and gets focused again. So I prefer the first option. In order to fix both issues, we can prevent focusing of composer if emoji picker is visible in App/src/libs/focusWithDelay.ts Line 17 in 6031f3e
to
Result30119.mp4What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.The emojipicker text field is not in focus when opening the emoji picker from the "Add Reaction" button after the emoji picker was already open from the compose's "Emoji" button. What is the root cause of that problem?We are using the onModalHide callback to focus on the compoer's textinput. In this case onModalHide is happening because we are clicking on another button. What changes do you think we should make in order to solve the problem?We should only focus on the composer text input if the emoji picker dialog is closed by pressing the "Emoji" button. Add a specific callback for that in EmojiPickerButton.js:
Then use that call back to focus on the composer text input in ReportActionItemMessageEdit.js:
We will also need to update the onEmojiSelected callback to focus on the composer text field since it would no longer happen due to the modal dismissal when an emoji is selected.; ReportActionCompose.js also has this problem if you click somewhere else on the screen (i.e. another textfield) it will force the focus on the ReportActionCompose's textfield What alternative solutions did you explore? (Optional) |
📣 @iiredalert! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
@cubuspl42 just waiting for your take on these proposals please |
@s-alves10 I like the fact that you noticed that this affects both edit and main composer. I'm wondering if the function
...while the implementation is aware of the composer (it refers to Do you have any thoughts on that? An open option is just updating the comment so it better reflects what this function does. Figuring it out will provoke us to investigate its usages and actual contract. |
Yeah. We use this function only for the composer. And it's related to the composer focus manager. |
@cubuspl42 What do you think of my proposal? It come first and we can do the same for the main composer |
@ahmedGaber93 Selecting a proposal based on the order of filing is a last resort. The first and most important property of a proposal should be its overall quality. |
While all the proposals provided a solution that would potentially work, I prefer the proposal by @s-alves10 for the following reasons:
C+ reviewed 🎀 👀 🎀 |
Triggered auto assignment to @flodnv, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@cubuspl42 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.94-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-11-09. 🎊 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:
|
This comment was marked as outdated.
This comment was marked as outdated.
|
Payment summary:
|
Thanks @twisterdotcom, I have accepted the offer. |
All 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.88.3
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: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697815510057299
Action Performed:
Expected Result:
App should focus on emoji picker search when any emoji picker is opened
Actual Result:
App displays focus on edit message even when reaction emoji picker is opened
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
windows.chrome.focus.on.edit.emoji.picker.mp4
mac.chrome.focus.on.edit.with.emoji.picker.open.mov
Recording.5102.mp4
MacOS: Desktop
mac.desktop.focus.on.edit.with.emoji.picker.open.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @twisterdotcomThe text was updated successfully, but these errors were encountered: