tabris-js icon indicating copy to clipboard operation
tabris-js copied to clipboard

Show progress/info screen during code sideloading

Open tbuschto opened this issue 7 years ago • 3 comments

Feedback from several sources complained about perceived hangups during code sideloading and unsatisfying behavior with connection issues.

I assume this can only be implemented natively.

tbuschto avatar Jun 29 '18 09:06 tbuschto

Related: #1695

tbuschto avatar Jun 29 '18 09:06 tbuschto

One possible mitigation would be to use the CLI to display some kind of progress indicator. The CLI (when used for sideloading) is aware of the beginning of a load operation (by delivering boot.min.js) and the approximate end of it, due to the device connecting via WebSocket.

However this does not cover the common case that there is no connection possible to begin with. This can only by solved by the native clients. While the developer app does a pre check if a package.json is found, this is not in place if the developer console is used to enter the url.

So I propose to align the sideloading process of both clients to this:

When the developer console is enabled (i.e. we are the developer app or a debug enabled app), an application is already loaded (e.g. the developer app) and a REMOTE URL is to be loaded either by API or by the developer console, the native client performs the following steps:

  • If a sideloading operation has already started (we are on any steps of this list), abort silently.
  • If there are spaces anywhere in the given URL, remove them. (Common user error)
  • If the URL does not start with "http(s)://", add it.
  • Perform the following checks:
    • Is the URL in a valid format?
    • Is a network connection available?
    • Can a package.json be found at the given url within ~3 seconds max.
    • Can a boot.min.js be found at the given url within ~3 seconds max.
  • If the answer to any of these is no, keep the current app running and show a popup stating the reason the app could not be loaded.
  • If all checks pass, start loading the new app giving SOME kind of feedback the loading started, be it a toast, a splash screen, a spinning wheel, ANYTHING but a blank white screen.
  • If any error occurs while initializing tabris, OR no tabris.Tabris object is created within 10 seconds, stop the whole process, open the developer console and print an error stating the reason the load operation failed.

tbuschto avatar Nov 20 '18 10:11 tbuschto

With the addition of the new developer tools ui and accompanying tabris.devtools object, the is has been resolved.

mpost avatar Mar 13 '20 11:03 mpost