TheGoddessInari / hamsket

Free and Open Source messaging and emailing app that combines common web applications into one.
GNU General Public License v3.0
882 stars 55 forks source link

Add mobile device emulation option if possible #24

Open TheGoddessInari opened 6 years ago

TheGoddessInari commented 6 years ago

Straightforward, but need to figure out the appropriate mobile view size to emulate. Perhaps based on the host window size?

TheGoddessInari commented 6 years ago

The documentation and issues were slightly misleading when I opened this. I believed it was possible to emulate a mobile with Electron, but it looks like it's wrong in two ways.

  1. It'll only emulate with devtools open and device menu open.
  2. It affects the entire window, not just each webview.

Not sure if nw.js is different in this regard, but if anyone knows how this can be reasonably accomplished, do let me know.

AlvaroBrey commented 6 years ago

This might be stupid (I know basically zero about electron), but wouldn't limiting the size of the webview and sending a mobile user-agent be a reasonable approach to this?

TheGoddessInari commented 6 years ago

Mobile does more than just change the view size and send a different user agent. It does touch-only events instead of mouse events, restricts some features, etc.

If all people want is a really ghetto mobile-alike hack, that can be done, but mobile emulation at the browser level is different. A mobile site would probably not 'act like mobile' though.

rodneyrod commented 6 years ago

Maybe it would be good for having a compact view for things I.e. not using the entire horizontal width of a screen.

rmcsharry commented 5 years ago

I would not expend too much effort on this functionality. Just provide people a link to download the Blisk browser. :)

screen shot 2018-12-22 at 15 30 15