phil294 / GitLG

A free, interactive Git UI for VSCode
MIT License
156 stars 16 forks source link

Use as a standalone program without VSCode #62

Open phil294 opened 1 year ago

phil294 commented 1 year ago

For anyone following this repository, this is what I am loosely working on currently. It's possible without too much work in general, as I am using Neutralinojs and it's just a bit of setup code. However, Neutralino can't handle vue-virtual-scroller for some reason, so I'm investigating possible alternatives.

After all of that, I will continue with other open issues - still a lot to do

vasil-sokolov commented 8 months ago

Hi, I have been diving into your project for a few days. In my practice, I use VS Code but its' git client is far from ideal. I'm using a well-known GitGraph extension, but as you know it has been abandoned. And it doesn't support key-based authentication. So every time I need to push a tag, I open a terminal and push it manually.

I was about to start writing my own super-git-lense-killer extension but I found your extension and it looks really promising. The only problem is that it doesn't solve my problem and the look needs some improvements.

I have already corrected some styles and wanted to look at key-based authentication. But I found this issue before creating a feature request here. The question I have now is why you do not use more popular frameworks and tools. Why do not use Electron for the desktop applications? Or even more. Since you use VueJS why do not use the Quasar framework? It has the excellent support of Electron and can be used to compile desktop apps and web apps at the same time. I'm interested because the toolset you use (coffee, stylus, etc) is great on its own, but reduces the number of users who can contribute to your project. Any newbie like me knows JS, SCSS, and HTML. Ok, Typescript is a synonym for JS these days. I believe using more popular languages and tools will make the project more developer-friendly.

In CONTRIBUTING.md you said that you are thinking about switching to 'normal JS'. What are the chances of that happening?

Sorry if my post sounds presumptuous. I didn't mean it to come off that way. I'm just trying to understand if I can be useful or if the project is too cool for me.

phil294 commented 8 months ago

Hello @vasil-sokolov,

I have paused working on the standalone feature (this very issue) for a while and instead focused on other stuff, but will probably soon resume this.

and the look needs some improvements.

Yes, any help here is welcome :) See also: #56

[I] wanted to look at key-based authentication

does it not work on its own already? This extension merely invokes git via command line, so all your ssh config etc should be used by default.

why you do not use more popular frameworks and tools.

simple personal preference and familiarity

Why do not use Electron for the desktop applications?

So far, there is no desktop app yet. What benefit would using Electron have over Neutralinojs (assuming there are no technical road blockers like the virtual scroller mentioned above)? Electron has the downside of a ridiculously big bundle and installation size: 260 MB vs 1 MB according to https://github.com/Elanis/web-to-desktop-framework-comparison. Also it's not quite like familiarity with Electron would help anyone much, as apart from the initial wiring, there will probably rarely ever be the need to deal with it. Almost all code is normal JavaScript independent of the underlying engine.

Would you be using this program out of VSCode, anyway? It's questionable at least if this will find any users, but I want to do it anyway.

why do not use the Quasar framework

Because external dependencies always become legacy maintenance headaches over time, and, more importantly, I have never worked with Quasar and reading up on it would have taken longer than copying the base skeleton including some prexisting components with regular Vue from various other past projects of mine. Fast development speed is one of the main principles here, next to offering maximum configurability to the user so that several feature requests just solve themselves.

Also I don't like flat design but that's probably a lost cause anyway.

Using a UI component library would be fine with me though, and Quasar is rather established by now. This could lead to the extension looking a bit out of place inside VSCode though. Tailwind would also be better than the current styling system which is admittedly all over the place and inconsistent.

Also this project needs some structure improvements, there should be nested folders.

I'm interested because the toolset you use (coffee, stylus, etc) is great on its own, but reduces the number of users who can contribute to your project. Any newbie like me knows JS, SCSS, and HTML.

Yeah :/ that's true. I like these three languages because they are basically like standard web development, with the sole exception of being indentation-based and able to omit boilerplate ({,<,;). Using Civet instead of CoffeeScript would bring that to the maximum, as it is fully compatible with normal JS/TS.

I believe using more popular languages and tools will make the project more developer-friendly.

But let's be real, this is a small project with a mere 12k installs and 95 GitHub stars. Lower barrier for entry would be nice, but I doubt it will affect PR activity much.

In CONTRIBUTING.md you said that you are thinking about switching to 'normal JS'. What are the chances of that happening?

I guess if it actually hinders people from contributing to the project, we should do that. But I'm not sure if it actually does.

Sorry if my post sounds presumptuous.

no, not at all :)

It would be great to have you on board, by any means whatsoever! There is much more demand for features than I am able to deliver right now, simply judging by the amount of open issues. Definitely a good sign though, as it shows folks are actually invested in getting a good Git front end.

vasil-sokolov commented 7 months ago

Hello,

Yes, any help here is welcome :) See also: https://github.com/phil294/git-log--graph/issues/56

Ok, I will create a pull request.

This extension merely invokes git via command line, so all your ssh config etc should be used by default.

My key has a password. I don't see the prompt to input the password.

As for the rest of the answers about the toolset, maybe you are right and have a better vision. I don't have any public projects but you do :)

Let's see what I can do first.

phil294 commented 7 months ago

My key has a password. I don't see the prompt to input the password.

Right, that's pretty tricky... I guess you could hack somehing together in the args field for your PUSH actions to ask you for your password using zenity or such? (unless you're on Windows) The behavior is fully customizable after all. No idea how to standardize that for all users though

phil294 commented 7 months ago

In fact, if you're on Linux (unsure about Mac) ssh-agent usually seems to ask the user for password via Gui already (https://unix.stackexchange.com/questions/83986/tell-ssh-to-use-a-graphical-prompt-for-key-passphrase). Maybe you don't have ssh-agent running, but could wrap the fetch command in a ssh-agent start and teardown afterwards if you don't want your user session to remember it. At least that's how I would do it. This is gonna be very hard to implement cross-platform wise.

phil294 commented 7 months ago

I've been thinking about the whole preprocessor topic some more, and I think switching to vanilla JS etc. is pretty much unavoidable, so let's better get it over with soon. Regardless of whether contributions will (a)rise, there's constantly more to do than I am capable of doing myself so a low entry barrier is more important than pure developer happiness. So my plan would be to remove SLM and CoffeeScript, spend some time refactoring and reworking the styling with Tailwind a bit and then continue on the Neutralinojs thingy

webJose commented 7 months ago

Hey, @phil294, how do you feel about Svelte? Pure JS is kind of a pain.

phil294 commented 7 months ago

@webJose I shouldn't have written "vanilla JS", I actually just meant non-coffeescript / non-preprocessed JS. In terms of web framework, we already have Vue.js 3 in place and its been massively helpful. Svelte would have been fine too, but I guess that's kind of settled now

phil294 commented 2 months ago

fyi coffeescript etc have been removed, it's all just normal web stuff / Vue.js now.