Show a spinner/loader while hooks are running (?)
Discussed in https://github.com/extrawurst/gitui/discussions/2033
Originally posted by valerio-pescatori February 7, 2024 Hi everyone!
I recently moved from vscode to helix and I'm using gitui to manage the git part in the terminal as well and I'm loving it! It's really easy to use, it has all the functionalities I need and it's really fast.
One thing I noticed though it's that if you have hooks setup, when you press enter to run the commit it kinda 'freezes'... obviously it's not freezing (bc it's blazing 💥 fast) it's just the hooks running in background. But before realizing the first time it I was kinda confused and started pressing random keys to understand what's going on.
So I was thinking: is there a way to display a spinner or a loader somewhere just to tell the user that the commit is actually being done and it did not freeze? That would improve ux/dx a lot imo.
Thank to all the contributors!
I think this makes sense. maybe the spinner is a bit too subtle in the long run but should be a good easy quick-win
Ok classic: its not that easy. we call the hooks in a blocking fashion right now, so we cannot simply show a message or rotate the spinner. we need to put this into a async flow that calls the hook in a separate thread and puts our UI into a specific state to illustrate whats going on
A spinner would be an improvement but I don't think it's enough. A lot of commit hooks show a more granular output while committing. For example here is a screenshot of the setup at my work using husky.
Would it be possible to show the hook output like it does with the git command?