-
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
Disable hover on device without hover support #22925
Conversation
@Santhosh-Sellavel 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] |
Bump @Santhosh-Sellavel |
@bernhardoj This was hardly reproducible earlier. Now it happens for every tap for me Screen_Recording_20230718_003145_Chrome.mp4 |
@Santhosh-Sellavel is the recording correct? I don't see any issue in the recording. |
Sorry updated @bernhardoj check now |
@Santhosh-Sellavel That's really weird. Are you sure you applied all the changes? especially this one
|
I was on your branch. While testing, as I said it was hard to reproduce the issue in other branches, very easily reproducible on yours. Also I'm using a real device to test. (S20 Plus) |
I'm also using a real device. Can you please try to log the value of |
Seems It's true, for me which device are you using? |
@Santhosh-Sellavel I'm using Redmi Note 8 Pro. So, I'm googling and found that Samsung devices did "support" hover This means all of our
but in Samsung devices, we will also early return, which means we ignore the long press on Samsung, but on mobile web, the long press will trigger App/src/components/PressableWithSecondaryInteraction/index.js Lines 51 to 72 in 5419d9b
So, no problem here. App/src/components/AutoCompleteSuggestions/index.js Lines 20 to 25 in 5419d9b
See the video below: Chrome.mp4The video above shows the correct behavior, that is long pressing the suggestion doesn't blur the composer. My guess is, on Samsung devices (both on the main and this branch), long pressing the suggestion will blur the composer, therefore closing the keyboard. So, here is the plan:
Here is an image showing device matching from https://drafts.csswg.org/mediaqueries/#mf-interaction This is working fine so far on my devices, both web and mobile. I can either push this update, or you can apply this change on your end first and see whether it solves the issue or not. But we also need to keep in mind that that's it. Let me know your thoughts! |
Yes, you are right, it blurs composer and closes the keyboard! |
This works for me on AutoSuggestion As I tested it. Can you a raise thread in Slack so we can get feedback and align based on a consensus on the solution before proceeding? If you have another solution please include that too, please tag me & @iwiznia in thread. |
Here is the dicussion https://expensify.slack.com/archives/C01GTK53T8Q/p1689930070214919 |
Pushed the new update. Retested + iPad and works fine so far. |
Reviewer Checklist
Screenshots/VideosWeb & DesktopScreen.Recording.2023-07-25.at.2.59.06.AM.movMobile Web - ChromeScreen_Recording_20230725_025242_Chrome.mp4Mobile Web - SafariScreen.Recording.2023-07-25.at.3.08.41.AM.moviOS & AndroidN/a |
I don't see any issues so far, all look good. But @bernhardoj can you please test other components as well that use Hoverable and ensure there's no breakage here? If all is good till tomorrow we can move to CME's review |
@Santhosh-Sellavel Sure. Below are the videos showing the Hoverable works on all components that use it (except Banner, idk how can I show the banner in a report screen as it requires an account manager id) Footer Screen.Recording.2023-07-25.at.12.57.08.movMenuItem (settings), OptionRow (search), OptionRowLHN (LHN), Tooltip, ReportActionItem Screen.Recording.2023-07-25.at.12.53.30.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.
Thanks, @bernhardoj, LGTM!
All yours @roryabraham!
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.
nice simplification
✋ 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 staging by https://github.com/roryabraham in version: 1.3.46-0 🚀
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.47-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.46-2 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.47-6 🚀
|
Details
We want to disable hover on device that doesn't support hover, for example mobile web.
Fixed Issues
$ #22759
PROPOSAL: #22759 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
mWeb only
On the Web, I'm just making sure the hover still works as usual
No hover on Android/iOS
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Screen.Recording.2023-07-15.at.10.37.48.mov
Mobile Web - Chrome
Screen.Recording.2023-07-15.at.10.50.06.mov
Mobile Web - Safari
Screen.Recording.2023-07-15.at.10.45.40.mov
Desktop
Screen.Recording.2023-07-15.at.10.45.05.mov
iOS
N/A
Android
N/A