-
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
[$250] mWeb - Selector - User lands on the same WS when double tapping on different one on selector #51402
Comments
Triggered auto assignment to @stephanieelliott ( |
We think that this bug might be related to #wave-collect - Release 1 |
@stephanieelliott FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
ProposalPlease re-state the problem that we are trying to solve in this issue.Selector - User lands on the same WS when double tapping on different one on selector What is the root cause of that problem?On double click, only App/src/pages/WorkspaceSwitcherPage/index.tsx Lines 85 to 100 in 09f19c3
What changes do you think we should make in order to solve the problem?Implement debouncing to prevent double click
What alternative solutions did you explore? (Optional) |
Edited by proposal-police: This proposal was edited at 2024-10-27 22:00:21 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.mWeb - Selector - User lands on the same WS when double tapping on different one on selector What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
const isFocused = useIsFocused();
const selectPolicy = useCallback(
(option?: WorkspaceListItem) => {
if (!option || !isFocused) {
return;
}
const {policyID} = option;
setActiveWorkspaceID(policyID);
Navigation.goBack();
if (policyID !== activeWorkspaceID) {
Navigation.navigateWithSwitchPolicyID({policyID});
}
},
[activeWorkspaceID, setActiveWorkspaceID, isFocused], What alternative solutions did you explore? (Optional)
Result |
Job added to Upwork: https://www.upwork.com/jobs/~021849976484014852041 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
@nyomanjyotisa Thanks for the proposal. Do you know why this happens on mWeb Chrome only? |
@Krishna2323 Thanks for the proposal. Same question ^ any idea why this does not happen on other platforms? |
@s77rt, It also happens on mWeb Safari, though I don’t have a clear understanding of why it behaves differently. I think this is the default behavior of mobile web, and it totally depends on how quickly the pressables are removed from the screen after selecting an option. I have also added an alternative solution in my proposal, please let me know your thoughts on that. bug_ios_safari_double_tap.mp4 |
@Krishna2323 Thanks for the update. I think using |
@Krishna2323 Did |
@s77rt, works perfectly on my machine. double_navigation_workspace_switcher.mp4 |
const selectPolicy = useCallback(
(option?: WorkspaceListItem) => {
if (!option) {
return;
}
const {policyID} = option;
if (policyID === activeWorkspaceID) {
Navigation.dismissModal();
return;
}
setActiveWorkspaceID(policyID);
Navigation.goBack();
if (policyID !== activeWorkspaceID) {
Navigation.navigateWithSwitchPolicyID({policyID});
}
},
[activeWorkspaceID, setActiveWorkspaceID],
); |
@Krishna2323 I think we still have another problem. After the first click the activeWorkspaceID is changed and so the position of the selected workspace. Now the second click is made on the previous workspace and causes same bug. Screen.Recording.2024-10-29.at.9.04.05.AM.mov |
Screen.Recording.2024-10-29.at.9.16.15.AM.mov |
@s77rt, what do you think about using App/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx Lines 296 to 301 in d78be88
App/src/pages/workspace/WorkspaceMembersPage.tsx Lines 151 to 159 in d78be88
|
@Krishna2323 I think that would be a workaround because the |
@s77rt, @stephanieelliott Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Still looking for proposals |
I am also thinking of using setTimeout for mWeb as we can't be sure about the behaviour in different browsers according to necolas/react-native-web#1943 . WDYT @s77rt |
@FitseTLT That discussion is outdated and no longer true, |
@s77rt not sure but it's probably to fix #24482 (comment) #24482 (comment) |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@s77rt, I still think this isn't a web bug, rather, it's the default behavior of the web. You can click on multiple links until the page is completely removed. We are facing this specific issue in App/src/pages/WorkspaceSwitcherPage/index.tsx Lines 85 to 100 in 81e877a
|
Yep checked the comments @s77rt , especially #24482 (comment) looks more relevant ( |
@s77rt, @stephanieelliott Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@Krishna2323 I see your point. But the fact that this is only reproducible on mWeb is still a concern. Can you please check if this is reproducible in native? |
@FitseTLT I don't think applying |
Because of Monosnap.screencast.2024-11-12.02-53-23.mp4 |
@s77rt I honestly can't see the inconsistency. The App speed in mWeb is more less the same as the native and this kind of issue can occur for the future on mWeb if the user taps multiple times too quick. So I think we should apply the same singleExecution solution we used in native. And that will avoid unnecessary lagging in the app for web/desktop as singleExecution is not needed for those platforms. |
@Krishna2323 I think we can proceed with the focus hook for now. We can revisit this if similar bugs occurs. 🎀 👀 🎀 C+ reviewed |
@FitseTLT The inconsistency is that we'd use |
Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@Krishna2323 @s77rt If possible I'd like us to see if we can write a unit test along with this fix in order to prevent this from regressing in the future. |
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR is in review |
PR is moving along, @Krishna2323 is working on some tests |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.53-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: https://expensify.testrail.io/index.php?/tests/view/5122323&group_by=cases:section_id&group_order=asc&group_id=296775
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
LHN should display the selected workspace chats when the user double taps over it in selector.
Actual Result:
User remains on the same workspace when trying to select "Expensify" option or next workspace on the selector list with double tapping.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6643981_1729740526844.Selector_WS.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @s77rtThe text was updated successfully, but these errors were encountered: