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 2023-10-16] [$500] Dev: Web - Room name field does not automatically focus when returning from the chat option #27607
Observe that the room name field does not auto-focus.
Expected Result:
Upon returning from the chat option, the room name field should automatically receive focus
Actual Result:
The room name field does not auto-focus when returning from the chat option
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: Dev 1.3.70.5 Reproducible in staging?: n Reproducible in production?: n 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
changed the title [-]Dev: Web - Room name field does not automatically focus when returning from the chat option[/-][+][$500] Dev: Web - Room name field does not automatically focus when returning from the chat option[/+]on Sep 16, 2023
Please re-state the problem that we are trying to solve in this issue.
The room name input field does not automatically gain focus when returning from the chat option.
What is the root cause of that problem?
The autoFocus combined with shouldDelayFocus props set for RoomNameInput do not work properly in conjunction with the navigation focus isFocused property with the tab navigator. autoFocus only works when the component is first mounted. Switching between the tabs in the OnyxTabNavigator does not remount the WorkspaceNewRoomPage, therefore the room name input does not regain focus after switching back to the Room tab.
What changes do you think we should make in order to solve the problem?
This is on dev and not reproducible on staging (v1.3.71-5) or prod (v1.3.70-8). I think we should close this until its reproducible on either staging or prod
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.79-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-10-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.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
For reference, here are some details about the assignees on this issue:
The PR that introduced the bug has been identified. Link to the PR:
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
Not a regression. Seems to be misses from latest UI rewamps.
Determine if we should create a regression test for this bug.
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Open the global create menu and select Send message
Click on the Room tab if it is not the active tab.
Verify that the room name input field gains focus.
Click on the Chat tab.
Click on the Room tab.
Verify that the room name input field regains focus.
Activity
[-]Dev: Web - Room name field does not automatically focus when returning from the chat option[/-][+][$500] Dev: Web - Room name field does not automatically focus when returning from the chat option[/+]melvin-bot commentedon Sep 16, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0183b28b14d01b5fa6
melvin-bot commentedon Sep 16, 2023
Triggered auto assignment to @MitchExpensify (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.melvin-bot commentedon Sep 16, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)akinwale commentedon Sep 16, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The room name input field does not automatically gain focus when returning from the chat option.
What is the root cause of that problem?
The
autoFocuscombined withshouldDelayFocusprops set forRoomNameInputdo not work properly in conjunction with the navigation focusisFocusedproperty with the tab navigator.autoFocusonly works when the component is first mounted. Switching between the tabs in theOnyxTabNavigatordoes not remount theWorkspaceNewRoomPage, therefore the room name input does not regain focus after switching back to the Room tab.What changes do you think we should make in order to solve the problem?
We are now using a new approach to autofocus text inputs upon launching a screen according to https://expensify.slack.com/archives/C01GTK53T8Q/p1694660990479979
The following changes need to be made in WorkspaceNewRoomPage.
RoomNameInputcomponent.useFocusEffecthook.RoomNameInput.What alternative solutions did you explore? (Optional)
None.
c3024 commentedon Sep 17, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Room name input is not focused when switching tabs and returning
What is the root cause of that problem?
Existing
RoomNameInputhas focus only on mount and switching tabs does not remount the component.What changes do you think we should make in order to solve the problem?
We are reusing this code for auto focusing input
Since this will likely be reused at several places we might extract to a custom hook
useDelayedFocusand use it in
WorkspaceNewRoomPageand add the ref to
RoomNameInputand remove
shouldDelayFocushere.What alternative solutions did you explore? (Optional)
MitchExpensify commentedon Sep 18, 2023
This is on dev and not reproducible on staging (v1.3.71-5) or prod (v1.3.70-8). I think we should close this until its reproducible on either staging or prod
c3024 commentedon Sep 22, 2023
This is now on staging v1.3.72-9. @MitchExpensify
32 remaining items
melvin-bot commentedon Oct 9, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.79-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-10-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.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
abdulrahuman5196 commentedon Oct 16, 2023
Not a regression. Seems to be misses from latest UI rewamps.
akinwale commentedon Oct 18, 2023
@MitchExpensify Just checking in here for payment. Thanks.
MitchExpensify commentedon Oct 18, 2023
Payment summary:
All Upwork:
MitchExpensify commentedon Oct 18, 2023
Paid and contract ended, thanks for the bump!
Just waiting on test rail updates (On me)
And @ayazhussain79 to accept Upwork offer
ayazhussain79 commentedon Oct 19, 2023
@MitchExpensify offer accepted, Thank you
MitchExpensify commentedon Oct 20, 2023
Mind sharing the offer/contract with me @ayazhussain79, I cannot find it in Upwork 😅 (Their search is terrible)
MitchExpensify commentedon Oct 20, 2023
https://github.com/Expensify/Expensify/issues/328389
ayazhussain79 commentedon Oct 20, 2023
@MitchExpensify I think there is no option to copy contract URL so sent you message on upwork.
MitchExpensify commentedon Oct 22, 2023
Paid! Thanks @ayazhussain79