JohnEarnest/Octo

Electron (Standalone) Build.

kjesris opened this issue ยท 7 comments

An electron build would make it possible to use octo offline without the need of hosting a server, or digging through the files. (Could also be used for mobile ports.)

If we make an electron build, there are some UI changes that are worth considering:

  1. Should there be a file menu?
  2. Can we add a checkbox for auto-saving changes to the file to disk?
  3. Does vim mode need to be extended to support wq?

Some of these might belong in separate tickets.

I'm not interested in maintaining an Electron port of Octo.

It is true that significant changes to the UI would be necessary to reflect the availability of general-purpose local filesystem interaction. Most of the exporting functionality in the Binary Tools panel of the toolbox would need tweaks, as another example.

Octo is open-source: anyone interested in Electron is free to pursue this idea in a fork.

Not interested in having it as part of this repo, or not interested in being the main person maintaining it?

Either way, it might still be a good idea to separate the tools from the current execution settings in the UI. If you're strongly opposed to electron being part of this repo, we could close this issue and continue discussing UI modifications in another ticket.

Also, I tried getting Octo loaded as-is in electron. How the manual is handled would also need some consideration, as the current appearance is a little odd:
image
In general, I think this might be doable, even if I'm not very up to date with electron or current JS practices.

I am neither interested in maintaining an electron port nor do I think it belongs in this repo. Electron depends on the npm ecosystem and draws in an enormous transitive closure of brittle, endlessly shifting dependencies and build infrastructure that I really do not want to deal with.

Octo currently fetches several resources from github pages while in operation. In addition to the manual, it retrieves the contents of the "examples" menu using GitHub APIs, and the standalone HTML build functionality fetches JS files from a github pages URL- see here: https://github.com/JohnEarnest/Octo/blob/gh-pages/js/sharing.js#L162

Octo "sharing URLs" are constructed by hitting a storage backend I host, and legacy URLs may also reach out to Github "Gists"- these are probably fine as-is, but without a URL bar there will need to be an entirely different UI for accessing/entering them.

Ok, I strongly agree with you that npm is full of brittleness. I don't object to closing this ticket, but I'd still like to discuss UI changes once I've thought about it some more. There are some changes that might be useful even if an electron build is never made, and I will probably be making a new ticket for that.

It has nothing to do with Electron, but I have a solution to offline mode and avoiding web browsers: c-octo!