responsively-app icon indicating copy to clipboard operation
responsively-app copied to clipboard

Allow users to define cursor mode based on device type

Open geiras opened this issue 3 years ago • 13 comments

🚀 Feature Request

📝 Description

When debugging mobile views, it's important to understand the cursor target size and simulate, as much as possible, the native behaviour of touchscreens.

✨ Describe the solution you'd like

I believe that it makes sense to emulate as much as possible the real behaviour of pointing devices. My suggestion is to allow the user to define what is the preferred cursor mode for any device. This way, I could say my mobile view has Touch Mode enabled by default and desktop would have the usual cursor.

✍️ Describe alternatives you've considered

Changing input modes when debugging mobile and desktop at the same time is time consuming but that's the only alternative I've seen so far.

geiras avatar May 07 '21 17:05 geiras

Hey @geiras :wave:,

Thank you for opening an issue. We will get back to you as soon as we can. Have you seen our Open Collective page? Please consider contributing financially to our project. This will help us involve more contributors and get to issues like yours faster.

https://opencollective.com/responsively

We offer priority support for all financial contributors. Don't forget to add priority label once you become one! :smile:

Right now the "Touch mode" is activated at app level:

https://github.com/responsively-org/responsively-app/blob/c5e74180108796760fcfa3f98b001083e8c49f7a/desktop-app/app/components/ToggleTouch/index.js#L43-L45

we can do exactly the same per device (per <webview/>) On WebView component:

this.getWebContents().debugger.sendCommand('Emulation.setEmitTouchEventsForMouse', {    
    enabled: isTouchMode,  
    configuration: "mobile" // (or "desktop") 
}); 

more info: https://chromedevtools.github.io/devtools-protocol/tot/Emulation/#method-setEmitTouchEventsForMouse

⚠ check this issue: https://github.com/electron/electron/issues/18438

cc: @manojVivek

jjavierdguezas avatar May 18 '21 15:05 jjavierdguezas

we can do exactly the same per device (per <webview/>)

@jjavierdguezas We have tried this but it didn't work as expected. It still enabled touch mode for the whole app.

Ref: https://github.com/responsively-org/responsively-app/issues/31#issuecomment-642577602

manojVivek avatar May 19 '21 04:05 manojVivek

we can do exactly the same per device (per <webview/>)

@jjavierdguezas We have tried this but it didn't work as expected. It still enabled touch mode for the whole app.

Ref: #31 (comment)

yeah that's the electron issue I linked too

jjavierdguezas avatar May 19 '21 07:05 jjavierdguezas

you can try https://www.npmjs.com/package/iohook

oluul avatar May 20 '21 14:05 oluul

can i work on this issue ?? i am interested in doing so?

sakshamp11 avatar Jan 05 '22 13:01 sakshamp11

Hey @sakshamp11, that's great, please take it up. 👍🏼

manojVivek avatar Jan 06 '22 05:01 manojVivek

i like so mach more

Filipegabri avatar Jun 10 '22 01:06 Filipegabri

Hey @Hooman-Asbaghi can I work on this issue?

GAURAV1-ui avatar Jul 21 '22 00:07 GAURAV1-ui

Hi @sakshamp11 are you still working on this?

jjavierdguezas avatar Jul 21 '22 14:07 jjavierdguezas

Duplicate of #

datcao85 avatar Jul 24 '22 19:07 datcao85

@jjavierdguezas hi bro

rohith-32151 avatar Aug 02 '22 11:08 rohith-32151

Wouldn't it be better for you to leave it out. Because in that case you can make it more objective, don't you think? @geiras

ghost avatar Aug 06 '22 01:08 ghost