Skip to content
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

webrepl: Use HTML5 application cache and add favicon #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

zsquareplusc
Copy link

With these changes, one can load the page once with the browser, it will cache the application and later when connected to the e.g. ESP board, it is possible to use the page even if the original place is not reachable anymore.

You can also "add link to start page" on mobile devices and use it like an app (*).

For this to work you also need to publish the page, which github makes easy for you, just put a copy of the master branch into the gh-pages branch and it will be accessible under http://organization.github.io/repository

You can see the result of gh-pages for my fork here:
https://zsquareplusc.github.io/webrepl/

(*) On my device (Chrome on Android) I had to ensure that only WIFI has a connection and no data connection was possible trough the mobile network, otherwise it would try to use the wrong network interface for the websocket. Also the term.js seems to have some quirks on small screens (e.g. rotating screen, show/hide keyboard) and input does not show up immediately. But it is working to execute commands. I'll leave fixing those to others...

@pfalcon
Copy link
Contributor

pfalcon commented May 14, 2016

Thanks for the patch and sorry for late reply! WebREPL client is intended to be used in 2 modes: 1) hosted on http://micropython.org/webrepl , there's own favicon and redirection logic there; 2) locally on user's machine or host; proper naming is important here, likewise the minimal size.

HTML structure was at least partially fixed, it was inherited from upstream project's demo code and indeed, it's funny that it's broken. You may want to submit that patch upstream.

html5 manifest may be interesting feature when the client becomes stable, and can be support hazard otherwise, e.g. we issued update, something somewhere glitched, user doesn't get the updates, noone knows what happens, and there's zero visibility into that stuff. WebREPL is already a webapp, user installs it with git clone, updates with git pull, and enjoys complete control.

Also the term.js seems to have some quirks on small screens (e.g. rotating screen, show/hide keyboard) and input does not show up immediately. But it is working to execute commands. I'll leave fixing those to others...

That's true, I for example found that paste barely worked at all, and had to patch it in, learning another batch of creepy stuff about the modern browsers. And that's the area where help would be welcome (should be also shared with upstream project, alas, I didn't have a chance to post even the current changes so far).

@pfalcon pfalcon closed this May 14, 2016
@hoihu
Copy link
Sponsor

hoihu commented May 14, 2016

@pfalcon: the patch allows to use webrepl on mobile devices if the board is in AP mode.

That would be nice to have if the board cannot be in station mode (because it is mounted somewhere remote). Using an offline mobile webapp to access the board might be an intuitive way to configure it.

Maybe once the websocket client is stable this can be reevaluated?

@pfalcon
Copy link
Contributor

pfalcon commented May 14, 2016

@hoihu : Did you test it? Does it work? On which devices? With which OS versions? With which browsers? Will you be around to help if someone has issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants