-
Notifications
You must be signed in to change notification settings - Fork 3k
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-05-16] [$1000] Enter key behavior changes after resizing window to mobile version #17206
Comments
Triggered auto assignment to @bfitzexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~01baaaae87b921beda |
Triggered auto assignment to @joekaufmanexpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
Triggered auto assignment to @joelbettner ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Enter key behaviour changes after resizing window to mobile/small screen etc. What is the root cause of that problem?Within
Below is the App/src/pages/home/report/ReportActionCompose.js Lines 582 to 586 in 3abe7b2
We can see at line What changes do you think we should make in order to solve the problem?Within // If condition - OLD
//if (!e || this.props.isSmallScreenWidth || this.props.isKeyboardShown) {
// return;
// }
// If condition - Updated
const isWeb = _.contains([CONST.OS.LINUX, CONST.OS.MAC_OS, CONST.OS.WINDOWS], getOperatingSystem());
if (!e || (!isWeb && this.props.isSmallScreenWidth) || this.props.isKeyboardShown) {
return;
} So this will solve the issue and it is working as expected. I tested in all platforms. To show how it works I uploaded video for web in results section. What alternative solutions did you explore? (Optional)None ResultsEnterKeySubmitComment.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Enter key behavior changes after resizing window to mobile version What is the root cause of that problem?According to this condition App/src/pages/home/report/ReportActionCompose.js Lines 582 to 586 in 3abe7b2
When enter key is pressed in small screen device or keyboard shown, it will do nothing What changes do you think we should make in order to solve the problem?There was discussion before in this behavior. It seems it's expected behavior on mWeb Chrome => https://github.com/Expensify/App/pull/13629/files#r1058438730 In case we want to change it, because
const isMobileOS = [CONST.OS.ANDROID, CONST.OS.IOS].includes(getOperatingSystem()); // we can define it in a lib to easy extend it later.
if (!e || isMobileOS || this.props.isKeyboardShown)
if (!e || (this.props.isSmallScreenWidth && DeviceCapabilities.canUseTouchScreen()) || this.props.isKeyboardShown) Moreover, we should change in this Edit composer too, to keep consistency |
ProposalPlease re-state the problem that we are trying to solve in this issue.On web, enter key creates a new line instead of sending the message when the screen resizes to a smaller size. What is the root cause of that problem?For smaller screens we are not allowing the enter key to submit the form as per the below condition. As user only can send message by clicking on the send button. App/src/pages/home/report/ReportActionCompose.js Lines 584 to 586 in b96c516
What changes do you think we should make in order to solve the problem?We should check the OS and if it is a mobile OS then only we shouldn't allow any hot key and return early.
App/src/pages/home/report/ReportActionCompose.js Lines 584 to 586 in b96c516
|
ProposalPlease re-state the problem that we are trying to solve in this issue.On web, enter key creates a new line instead of sending the message when the screen resizes to a smaller size. What is the root cause of that problem?In src/pages/home/report/ReportActionCompose.js triggerHotkeyActions relies on this.props.isSmallScreenWidth for identifying mobile web & native clients. What changes do you think we should make in order to solve the problem?I would like to propose usage of (Platform.OS)[https://reactnative.dev/docs/platform#os] to detect mobile.native clients.
|
@hoangzinh's proposal looks good to me! (No OS specific code, and native will behave same as web when a hardware keyboard is attached) @joelbettner C+ reviewed 🎀 👀 🎀 |
@rushatgabhane I think the selected proposal won't work for the mWeb and it sends the message on enter(checked in the emulator and isKeyboardShown is false for mweb). |
@Pujan92 thanks for raising that! Tested again, it works fine for mWeb. WhatsApp.Video.2023-04-11.at.19.38.44.mp4 |
@rushatgabhane Sorry, forgot to mention, I tried in mWeb emulator with Safari Simulator.Screen.Recording.-.iPhone.14.-.2023-04-11.at.22.15.46.mp4 |
Oh man, safari :/ Great catch btw! We'll have to use platform code then. You happen to have a different approach? |
@rushatgabhane Kindly review my proposal above #17206 (comment) It is working as expected in every platform including mweb safari. Thank you. |
Haha. |
@Pujan92 thanks for pointing out my proposal not work correctly. Is it a known issue on mWeb Safari? I couldn't find out any document mention about this issue in mWeb Safari |
didn't get time yet. hopefully will review today 🤞 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.12-0 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-05-16. 🎊 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.
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
|
Hi team, just want to share that I originally reported this bug here cc: @bfitzexpensify |
Hi @bfitzexpensify, just a note to hire me on this account - https://www.upwork.com/freelancers/~01212e8255b02ae924 All context here - https://expensify.slack.com/archives/C02NK2DQWUX/p1683614947522329 |
|
Offers sent out @rushatgabhane @hoangzinh @Nathan-Mulugeta @daraksha-dk |
Accepted offer. Thanks @bfitzexpensify |
Just accepted the offer. |
Accepted the offer, thanks! |
@bfitzexpensify anything else we need to do here? |
Looks like we still need to complete the bug-zero checklist cc @rushatgabhane |
Bump @rushatgabhane |
@bfitzexpensify completed the checklist! |
@rushatgabhane I think the confusion is just coming from that you didn't check the actual tick boxes in this comment: #17206 (comment) |
I cannot edit other's messages. I don't have the access. So 😅 |
Gotcha. I checked those off for you, @rushatgabhane. @bfitzexpensify I also checked off the item you're tagged in from the list, because there was nothing to do for it. |
Great, let's close this out then. Thanks for the work here everyone! |
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:
Expected Result:
The message should be sent regardless of the window size.
Actual Result:
After resizing the window to mobile version, hitting “Enter” on keyboard creates a new line instead of sending the message, which is inconsistent with the desktop version.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.2.97-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
2023-04-08.12.41.59.mp4
Recording.179.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1680948521534009
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: