icyphox / legit

web frontend for git
https://git.icyphox.sh
MIT License
376 stars 25 forks source link

htmx to make GUI faster and easier to add new feature. #21

Closed gedw99 closed 1 year ago

gedw99 commented 1 year ago

Is we used htmx, the gui would update in sections, based on the backend.

https://htmx.org/

simple but effective golang example:

https://github.com/quii/todo

icyphox commented 1 year ago

Hi, thanks for the suggestion but I don't think the use of htmx is warranted here. The UI is fast enough as is, and pulling in JS frameworks defeats the minimalist appeal.

That said, you can modify the templates however you please on your own installation and use whatever you want. Not sure if it'll work though since you'll probably need legit to behave as an API? I don't know.

I'll close this now. Thanks again.

gedw99 commented 1 year ago

hey @icyphox

thanks for the feedback.

Ironically this pattern of diffing, patching and merging , is exactly like how git works....

About Client: I was planning to just do direct injection of the SSE stream into the HTML in the browser. So its 5 lines of js.

About API: I dont have to change any of the Server API. I can just put a XML DIFF and PATCH proxy on top and send ONLY the DIFF to the client over SSE.

So this means NO changes to legit, because the Proxy will add the JS on the fly.

I am planning to build a GIT CLI and CTL that is pure golang without the need for Git binary. I was surprised you got so far with github.com/bluekeyes/go-gitdiff. That package is impressive.