wpilibsuite / vscode-wpilib

Visual Studio Code WPILib extensions
Other
111 stars 48 forks source link

Proposal: Webviews and Electron app to use JS framework and design library #55

Open kennethkau opened 6 years ago

kennethkau commented 6 years ago

Would it be possible to use a JS framework (like Vue or React) and a design library (like Material Design or Bootstrap) for webviews and the Electron app?

A potential stack would be:

My goal is to leverage existing libraries to improve design, development, and testing but also keep dependencies and complexity low.

ThadHouse commented 6 years ago

For webviews its not really possible. They're very limiting on what they can do in the scope of VS Code Webviews.

Also, the pages are incredibly simple, and adding giant frameworks just adds unnecessary dependencies for something that is simple enough to be done without a framework.

Also, the reason the webviews use raw javascript is because VS Code is not on electron 2, so no module support, and setting up the build to get the setup working was way more work then just writing the ~50 lines of vanilla js.

ThadHouse commented 6 years ago

For the riolog view I could maybe see an argument, but again its such a simple page that a little bit of CSS would be much simpler, much more maintainable for most of our developers, and could still look just as good to our users.

But for the project creation webpages, we likely would not add any frameworks, just purely because theyre even more simple, and used once a year by teams.

Once electron has module support, I will switch the js files for the webviews to typescript files, but for now that just wasn't feasible or necessary.

ThadHouse commented 6 years ago

I guess the electron app I'm not opposed to this, however I have no knowledge on any of the frameworks, so anything done needs to be maintainable and teachable to us. The webviews are a definite no because of how limited they are upstream.

roshanr10 commented 5 years ago

@kennethkau @ThadHouse Is there anything in particular you were looking to change within the Electron app?

I'm currently looking to clean up the UI so it's simpler to teach to our underclassmen as we shift back to IntelliJ instead of VSCode for it's code competition while still keeping the vendordeps utils. Thought that I may as well discuss beforehand so other teams can benefit as well through this project.

ThadHouse commented 5 years ago

I don't have any real focus's for the app in particular. I would like to keep the shared UI of RioLog and the new project creator the same between the app and the extension, which limits those UI's to not using any fancy frameworks. I also prefer vanilla TS and vanilla JS anyway, so I would kind of like to keep those as well. However, as long as changes can be done with those restrictions I would be happy to see changes.

roshanr10 commented 5 years ago

Awesome, yeah I can stick with vanilla JS/CSS, just want to streamline the interface; currently you can't even go between riolog and vendordeps without restarting the app. I'll PR something for this in the coming weeks along with #230 and #231.

Ideally, I think the Electron app can & should be functionally equivalent to the VS Code plugin, so I'll do my best on that front.