Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

design of desktop version #14

Open
grimmer0125 opened this issue Jan 24, 2018 · 0 comments
Open

design of desktop version #14

grimmer0125 opened this issue Jan 24, 2018 · 0 comments

Comments

@grimmer0125
Copy link
Contributor

grimmer0125 commented Jan 24, 2018

Target:
1. let user can install new CARTA locally and operate it. (mainly for local files)
2. better user experience than browser version (but still keep browser version). supply switch function between local and remote servers.

Tech:

  1. electron desktop connects to a local/remote server out of the desktop app.
  2. local server: use docker to host it. And let electron launch it and even update it.
  3. switch function.

Let electron directly invoke CARTA C++ server program is possible. But it makes things complicated and also newCARTA c++ code has a sleep issue so that using Docker should be a better choice.

Proposal:

  1. in Main.js of Electron, use something like child_process.spawn to execture some script to launch CARTA cpp. ref: https://github.com/grimmer0125/electron-face-finder/blob/dev/main.js#L19

two ways:

1.. in above main.js, docker-start-dev.sh
2. ./scripts/docker-stop.sh & ./scripts/docker-start-debug.sh, see that repo's readme.

--
Three phases of switch function:

  1. [Done] Launch app. Choose local or remote server mode.
    1. use initial.html to host two buttons which navigate two urls.
    2. or use native menu item of Electron.
  2. [Done] After choosing one mode, users can switch to another mode.
    1. use native menu item of Electron.
    2. or add switch mode UI somewhere.
  3. [Done] Cache/Restore one mode which is ever browsed. This needs to be figured out !!!!!

Other to-do features:

  1. [done] initial screen fine tune.
  2. [partial] fullscreen/maximize. How: click MenuItem or titlebar.
  3. Dockerize meteor code. So we probably need two docker images, one is c++, the other is meteor js code.

repo: https://github.com/CARTAvis/newCARTADesktop.

Issues:

  1. How to debug? It seems that some IDE, like WebStrom can easily debug Electron apps (main process and renderer process). But this design put the HTML on the server side (http/https, rather than local file system (file://), it may not be easy to debug renderer process. But even so, we still can keep pure browser version and use VS code's debugger for chrome to debug HTML code.
  2. the requirement of multiple instances to compare two files side by side? It is possible to add multiple window in desktop. But a workaround way is to open two browser tabs to connect to localhost or remote server.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant