-
Notifications
You must be signed in to change notification settings - Fork 109
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
Graphical user interface #42
Comments
Would you rather go for a native design on each platform or a unique design for all like Spotify? In the past (veeery far) I've made some mockups for a LibreOffice ui proposal, so I guess could help with the design tasks. |
I was going to take phockup and put it in a electron app to provide a GUI for personal use, I'll share here when I get time to try it out. That way it would be universal. |
I don't like Electron apps because they are heavy but any GUI is better than no GUI. |
Ok, i was looking at appjar as well since it's for python, it's just that it's not that pretty. But maybe that's better since it's all in python then. I'll have look at report back. |
I'm not completely against Electron since I am web developer and it will be much easier for me to code the desired interface, but if it can be accomplished with something lighter it will be better. |
I was reading about CEF Python (Chromium Embedded Framework for Python) which seems to be an alternative to electron, though I got no experience with anything of it. It's nice to know you're a web developer. A couple days ago I started playing with a proposal of UI for phockup: https://pauloup.github.io/phockup-gui.html. Please, active input and output and interact with the options to preview a phockup call at the bottom. Maybe you can take some ideas from it, since my code may be very amateur to be of any use. |
So I created a GUI using electronjs just because it's the fastest for me to create concept. Check this video of it running. It's working with no issues and has all options. I took your design but just changed a little to make it consistent. Couple of issues/points:
Features:
Things that still need to be done:
https://www.youtube.com/watch?v=rbR6Kzt3wys&feature=youtu.be |
I prefer the GUI to be part of the main software. My initial plan for the GUI was to make the default way to use the software and keep the cli as fallback just in case you do not want to use the GUI but all the options should be available at both interfaces. Yesterday I thought about using WebSockets to communicate with the Electron based GUI. For example if we add a flag The video is unavailable on YouTube. Maybe it is private? If so you can change its visibility to unlisted. |
Fixed video :) try now. When you say websocket server do you mean like this example? https://github.com/fyears/electron-python-example The current solution is basically like that but is using python shell to communicate but I could easily update to update to use websocket. But again, example linked spawns python server from electron. So as you saying to provide option to launch GUI with flag --gui, I'm not sure how that would work? If you could explain I could try looking into it. |
The interface looks basic but it can do the job for initial version. Maybe we can polish it for v2.0. I really like the look of Etcher. Using the Python shell will limit us of how we send over the output to the GUI as we have to parse the stdout in JavaScript and this is tedious. If we send JSON data through websockets alongside the normal stdout the GUI can use this data directly and we can ignore the stdout for the GUI. |
Yeah I've just taken @pauloup design but it's html/css so can make it look like etcher. Yep I noted the limitations of using Python shell in other comment so definitely better to do the websockets server. The thing I don't understand with the electron/python solution is how it will be distributed? Currently you just download python script and run from terminal. But if you use electron will it be an electron bundle that you download and just run that and no need to run anything in terminal? I'll share what i've done so far so if someone else wants to pick it up. It should be hard since the example I linked does what we trying. I wont have time at the moment to clean up code and test on other platforms. I'll update with github link once I upload. |
That gui in the video is beautiful. I wish it could run on the docker version as a webpage. |
The code is here, I haven't touched it for a while but you could update and probably easy to put in a docker image. https://github.com/apat183/phockup-ui |
Creating a cross platform GUI will be the best thing that can happen for this software and I think this could be the major feature for v2 milestone.
Since I have zero experience with coding GUIs for desktop apps and especially with Pyton any help will be appreciated.
I made a research some time ago about which library to use in order to accomplish full cross platform GUI solution but haven't found any easy to use solution. Any suggestions are welcome!
The text was updated successfully, but these errors were encountered: