-
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
[$250] Keyboard opens with composer autofocused when modifying an expense and go back to the report #55485
Comments
Triggered auto assignment to @muttmuure ( |
Just leaving a comment here that we would love to remove the autofocus of the chat composer is all of these cases. We do NOT want to touch the autofocus behavior of push inputs and things like that, but we think that navigating to a chat room on a mobile device should not autofocus the composer. |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx Line 269 in bec182c
So, the composer is auto focused. And because we call: App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx Line 685 in bec182c
the keyboard will be shown as mentioned in OP. What changes do you think we should make in order to solve the problem?
App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx Line 269 in bec182c
App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx Line 685 in bec182c
and add useEffect:
This is optional solution to make sure keyboard never shows when going back. What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional) |
🚨 Edited by proposal-police: This proposal was edited at 2025-01-21 16:39:16 UTC. 🚨 Edited by proposal-police: This proposal was edited at 2025-01-21 16:37:34 UTC. 🚨 Edited by proposal-police: This proposal was edited at 2025-01-21 07:10:16 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Based on @shawnborton latest comment, we don't want to autofocus the composer on mobile. What is the root cause of that problem?There are 2 codes that are responsible for the issue.
What changes do you think we should make in order to solve the problem?We need to remove both
If we want to keep the logic to autofocus when opening the report for the first time, then we need to keep App/src/hooks/useAutoFocusInput.ts Lines 24 to 35 in f51798b
This will fix for native platforms. For mWeb platforms, we can update the
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A |
I think in general, on mobile devices, we do not want to autofocus the chat composer ever. |
I see. I was not sure because in this issue, we want to always autofocus the composer when opening a report, but not show the keyboard. I have updated my proposal so it will never autofocus the composer on mobile. |
@muttmuure Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@muttmuure 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
Job added to Upwork: https://www.upwork.com/jobs/~021884356731032077905 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani ( |
@shawnborton, currently when we go to any report on mobile devices, we indicate focus on the composer with a green outline, but we do not open the keyboard. I think we want to keep this behavior, right? What do you think? I'm adding a video below to break this down. First, I navigated to the workspace chat that has one IOU report. Here, we can see that the composer is focused, but the keyboard doesn’t open. Then, I navigated to the IOU report, and again, the keyboard doesn’t open, but the composer still looks focused. However, when I navigated to the report description and then came back to the IOU report, the keyboard opened. IMO, We only need to fix the keyboard opening in this case. iou-keyboard-issue.mov |
We definitely do not want to keep that. I actually think that's a bug... why would we show the composer as being focused if the user can't even type into it? So I say we remove that styling and only show focused composer styles if the composer is indeed focused. |
If we don't want to auto-focus on mobile devices or show the green active composer outline altogether, We can go with @bernhardoj 's Proposal to remove the usage of 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @marcochavezf, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@marcochavezf @jayeshmangwani @muttmuure this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@marcochavezf, @jayeshmangwani, @muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@marcochavezf, whenever you get a chance, please check this comment for the above proposal. |
Big agree. Let's try to get this one moving, the autofocus when returning is super annoying! |
Apologies for the delay, the proposal looks good. Thanks for the review @jayeshmangwani, assigning @bernhardoj 🚀 |
PR is ready cc: @jayeshmangwani |
Issue not reproducible during KI retests. (First week) |
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: 9.0.87-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @saracouto
Slack conversation (hyperlinked to channel name): expense
Action Performed:
Expected Result:
Keyboard does not open with composer autofocussed
Actual Result:
Keyboard opens with composer autofocused when modifying an expense and go back to the report
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
SKKV0753.1.MP4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @jayeshmangwaniThe text was updated successfully, but these errors were encountered: