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

UI overhaul #1150

Closed
NeoTheThird opened this issue Mar 23, 2020 · 13 comments
Closed

UI overhaul #1150

NeoTheThird opened this issue Mar 23, 2020 · 13 comments
Assignees
Labels
enhancement a new feature or an improvement of existing functionality

Comments

@NeoTheThird
Copy link
Member

The UI code is terribly bloated. Might be easiest to burn the whole thing to the ground and start anew. Seriously, what the fuck is this.

@NeoTheThird
Copy link
Member Author

We might also have to replace pug entirely, because it's not compatible with newer versions of electron :(

image

@pajlow
Copy link
Contributor

pajlow commented May 12, 2020

@NeoTheThird Hi, what are your thoughts on Svelte? I think it is pretty simple to pick up and provides nice templating possibilities? Although you probably have Vue in mind. :)

@NeoTheThird NeoTheThird added the enhancement a new feature or an improvement of existing functionality label Sep 23, 2020
@NeoTheThird
Copy link
Member Author

@pajlow yeah, i was planning using vue, as i have never used svelte. But i'll be happy to have my mind changed if someone were to contribute wink wink nudge nudge

@pajlow
Copy link
Contributor

pajlow commented Sep 26, 2020

@NeoTheThird I will start to set some things up and implement routing and a reusable component for all the modals. Should I open a pull request for insights after that?

@NeoTheThird
Copy link
Member Author

Sure, that'd be great! I should add a disclaimer that i can't promise that we'll go with that approach, so don't pour in too much work upfront. Feel free to open a PR early, if it demonstrates that the approach is good, so i can take a look at it. :)

@NeoTheThird
Copy link
Member Author

@pajlow I checked out some Svelte code the other day, i have to say, i actually rather like it! Looking forward to seeing what you'll come up with. I just wanted to give you a heads up that i've just merged #1425 to upgrade us to electron 10, i hope that doesn't create too much extra hassle for you.

@pajlow
Copy link
Contributor

pajlow commented Oct 6, 2020

@NeoTheThird Glad to hear. While it is not that difficult to get svelte working with electron, combining messages (ipcMain) gives me some headache. Should the logic stay inside main.js and be called from the components?
No worries about the upgrade. :)

@NeoTheThird
Copy link
Member Author

@pajlow

Should the logic stay inside main.js and be called from the components?

Back in the olden days, all logic resided in the rendering process, which wasn't great. When i separated that, i had the idea to keep the UI optional, and also offer a cli-only mode (#696). I still think that'd be a nice thing to have, but if it creates too much additional work, it's also ok to leave it. I would however prefer to not do stuff like call an adb command directly from the renderer. I think there's currently too much stuff in the file main.js, and it needs more modularization. But i think keeping the logic in the main process has done us good.

@NeoTheThird
Copy link
Member Author

Did you manage to send messages back and forth at all? If you want, maybe you can try setting the whole thing up without the backend logic first, and just listen to the appropriate signals from main, so we treat the ipc messages as an interface, which is what it's supposed to be. I'm also happy to re-define some of the messages. Sky's the limit! It's supposed to be an overhaul of the UI after all, so i'm happy to change (and improve!) fundamental things.

@pajlow
Copy link
Contributor

pajlow commented Oct 11, 2020

I will try your suggested approach. I have some more time next week. So far I just set up svelte and some dependencies etc. I will let you know when I have some more progress. :)

@NeoTheThird
Copy link
Member Author

Awesome, looking forward. Good luck!

@pajlow
Copy link
Contributor

pajlow commented Nov 9, 2020

Small update: I am switching all pug templates to svelte components. So far I replaced waiting-for-device, working and the device selection modal. I updated bootstrap and recognized that a lot of styles are overwritten by the global css file. I changed the absolute positioning of the overall layout (Header - Page/Route - Footer) to a flexbox layout. At the moment I am figuring out when which signal is needed and listen or send them in specific components.

@NeoTheThird
Copy link
Member Author

Awesome, looking forward to seeing it! Thanks for the update. Let me know if you have any questions or anything that you need from me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a new feature or an improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants