Dedicated repos view
Is your feature request related to a problem? Please describe. Currently if you press enter in the status view (top left) you get a menu for selecting recent repos. All you can do in this menu is select a repo to switch to, but it would be cool if you could perform more actions.
Some actions you may want to perform:
- switch to repo
- pull/push/fetch
- run a custom command (e.g.
npm install) - run a pre-configured custom command
All of these actions (except switching) can support range select, allowing users to easily perform bulk actions (e.g. pull several branches at once).
Describe the solution you'd like We need a dedicated repos view which shows the list of repos and lets you perform actions on them. This view will replace the existing popup.
The real question is: where should it live? Two candidates come to mind:
- have the dedicated view work just like the recent repos menu currently does: appearing as a popup when you press enter in the status view
- convert the status view into a repos view, that expands on focus to show the list of repos, just like how the stash view currently does
Pros of using a popup:
- we can make it as large as we want so we don't need to deal with showing a compact and expanded variant (likewise, the user won't need to manually expand the view to see all the content)
- the status view can remain dedicated to application-specific keybindings like checking for updates and editing the config file (as well as rendering useful links in the main view). It would also be weird if the user selected another repo from the list but then navigated away: do we show the selected item like we do with the stash view, or do we revert to showing the current repo's status? I'd pick the latter, but it would be inconsistent with other list views
Pros of using the status view:
- it's more discoverable: there's no need to look up how to view recent repos because they'll be right there in the view when you focus it
- we'll be able to render repo-specific content to the main view, as opposed to blocking the main view with a popup.
- slightly less of a context switch compared to going from the side panel to a popup and back
We could also do a hybrid approach where you press enter on the status view to bring up the repos view, but the repos view appears in the side panel. That would be less discoverable than a dedicated repos side view, but would allow us to render repo-specific content in the main view. But do we even want to do that? What would we render?
At the moment I'm leaning towards using a popup.
What do people think?
allowing users to easily perform bulk actions
I love this ♥ because I use in my job several repos and just do pull with all of them it saves time everyday
As for how to implement it, I think I prefer the 2nd option, as a unique panel on the status section. I like the idea of see everything at first glance just having the scope in the panel
About the hybrid approach I'm not sure, but it's true the right panel (the big one) could show the log when you run a command or the repositories path
By the way, in addition to adding repos, I think it'd good to be able to remove the repos we no longer use
Would be nice to be able to open a repo never opened before without exiting lazygit (maybe it's already possible?)