-
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
fix User has to click twice to select currency #42380
Conversation
@jayeshmangwani Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@tienifr Update the Test step And mention that we need to long press the currency, and also Android and Android chrome Videos are missing in the checklist |
@tienifr I am able to reproduce the original issue in Android chrome, would you confirm if its working for you. |
@tienifr bump for the update |
I am checking it |
|
Thanks for the update |
@tienifr Are you able to find the cause of why it's happening for Android Chrome? |
@jayeshmangwani I still investigate it. |
@jayeshmangwani My solution is, in here, add:
so when the user long presses on any option, it will trigger |
What's the reason why it's working for the mWeb safari and not the mWeb Chrome? It should be worked the same way in both Safari and Chrome |
I am still investigating the RCA. |
Thanks, I will also try to look into this today |
@jayeshmangwani Did you find the RCA? |
@tienifr No, But I am not confident in this solution either, I would suggest we should close this PR and open the original issue for the new proposals that also solve with the Android chrome too |
Screen.Recording.2024-06-05.at.17.59.50.movTherefore, I propose that we address this issue across all platforms as it is a straightforward fix. Subsequently, we can create a new issue specifically to resolve the long-press problem in Android Chrome. |
I mostly agree with this solution. Android mWeb seems like an outstanding issue that is related. Perhaps we could hold this temporarily to see if the solution to Android mWeb ends up giving us a similar solution here? |
Are you suggesting that we should proceed with this PR and create a new issue for the Android Chrome's long-press problem? |
Yeah I see two options:
I prefer the first, because it could take a while to prioritise and get a library solution implemented. Does that sound good? |
Yes, that sounds good. We will finish this PR and for Android chrome will open the other discussion |
@jayeshmangwani Should we continue to review it? |
Yes @tienifr , Will review in next 2 hours, I am on other PR rn and then review this |
@tienifr we don't need to pass the |
Could you share the video? It’s possible the option you tried to long-press is the last one, so there might be no scroll effect. |
Yes sure, here's the video mweb-safari.mov |
@jayeshmangwani Can you try to long-press on the top options in the list? |
Yes tried, long press doesn't do anything for me |
In the latest code, what's the output for you ? add a video here to compare result |
Here is from my side: Screen.Recording.2024-06-07.at.23.45.31.mov |
I have tried with the few simulators, long press doesn't work for me on mWeb safari. From your video I can say you long-pressed currency for around 2 seconds, I would say try with few more seconds, e.g. long-press for 5 seconds,For me pressing few more seconds is not working on the mWeb safari but it is working for web |
|
Are you able to reproduce the issue that I have mentioned here ? |
Yes, I can. If I long press more than 5 seconds, it does nothing. |
Thanks for confirming @Julesssss when we press currency option for longer than 5 seconds, no event is triggered in Safari on mWeb, tienifr confirmed that this behavior is consistent across the app, Should we proceed with the PR, ignoring case where the user presses for more than 5-6 seconds? |
Ah damn, sorry I should have noticed earlier 😞 I think not, if the behaviour is consistent and with this being an odd use case I think we should not move forward. If anyone disagrees please let me know. |
Sorry, I do not fully understand what you mean here. |
I understood this sentence to mean that long pressing components on iOS safari to be consistent throughout the app:
Is that not the case? |
|
Thanks for explaining 👍
So yes, I think that is totally fine. |
@Julesssss Should we move forward with this PR ? |
@jayeshmangwani yep |
@@ -300,7 +299,6 @@ function WorkspaceTaxesPage({ | |||
ListItem={TableListItem} | |||
customListHeader={getCustomListHeader()} | |||
listHeaderContent={isSmallScreenWidth ? getHeaderText() : null} | |||
shouldPreventDefaultFocusOnSelectRow={!DeviceCapabilities.canUseTouchScreen()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tienifr IMO we should not remove the shouldPreventDefaultFocusOnSelectRow
prop from the SelectionList Component this will cause the unexpected result as this was added for some other reason
App/src/components/SelectionList/BaseSelectionList.tsx
Lines 307 to 309 in 0c3b262
if (shouldShowTextInput && shouldPreventDefaultFocusOnSelectRow && innerTextInputRef.current) { | |
innerTextInputRef.current.focus(); | |
} |
App/src/components/SelectionList/BaseSelectionList.tsx
Lines 315 to 317 in 0c3b262
if (shouldShowTextInput && shouldPreventDefaultFocusOnSelectRow && innerTextInputRef.current) { | |
innerTextInputRef.current.focus(); | |
} |
onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that makes sense. I will update the PRs.
@jayeshmangwani I addressed your comment |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid.movAndroid: mWeb ChromemWeb-chrome.moviOS: NativeiOS.moviOS: mWeb SafarimWeb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.83-3 🚀
|
Details
Fixed Issues
$ #41922
PROPOSAL: #41922 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2024-05-23.at.06.23.23.mov
Android: mWeb Chrome
iOS: Native
Screen.Recording.2024-05-21.at.08.45.22.mov
iOS: mWeb Safari
Screen.Recording.2024-05-21.at.08.51.45.mov
MacOS: Chrome / Safari
Screen.Recording.2024-05-20.at.16.47.26.mov
MacOS: Desktop
Screen.Recording.2024-05-20.at.17.33.16.mov