gex icon indicating copy to clipboard operation
gex copied to clipboard

Adds the ability to view stash in status window and pop individual stash entries

Open LukeHalasy opened this issue 2 years ago • 5 comments

W.I.P Add stash abilities to gex (beyond the current stash commands)

LukeHalasy avatar Oct 07 '23 00:10 LukeHalasy

@Piturnah What do we think about adding stash info to Gex ?

LukeHalasy avatar Oct 07 '23 00:10 LukeHalasy

TODOs (if this is something we want):

  • [ ] Collapse stash list by default
  • [ ] Refresh after stash pop
  • [ ] Add info to README.md
  • [ ] Clean up the cursor count logic. (would love thoughts on how to do so)

LukeHalasy avatar Oct 07 '23 01:10 LukeHalasy

This is great, and is absolutely a needed feature in gex.

I think it's worth considering an alternate flow that's more like the branch list, wherein you can press z for stash and then there's a subcommand that brings up the list of stashes. Here's my thinking for why this would be better:

  • Keeps the main view a bit cleaner, especially true if you have a lot of stashes
  • Can later implement #86 in such a way as to be reusable for the stash list
  • Feels less "fragmented", we already have a Stash command, so it feels like this feature would be more intuitive under it

The main downside I see here is that it brings the user experience further from Magit, which can be a pain point for users who are coming from there. It is explicit in the project readme that the goal is to not reproduce 1:1 magit behaviour, but I still think this point is worth bringing up (even if not given too much weight)

Your idea to collapse the stash list by default is a good one that also helps with the decluttering, but if we're doing that then it seems to me like it is worth considering just putting it in a different view to get the searching upside

What do you think?

Piturnah avatar Oct 09 '23 14:10 Piturnah

This is great, and is absolutely a needed feature in gex.

I think it's worth considering an alternate flow that's more like the branch list, wherein you can press z for stash and then there's a subcommand that brings up the list of stashes. Here's my thinking for why this would be better:

  • Keeps the main view a bit cleaner, especially true if you have a lot of stashes
  • Can later implement [Feature]: Search branch list #86 in such a way as to be reusable for the stash list
  • Feels less "fragmented", we already have a Stash command, so it feels like this feature would be more intuitive under it

The main downside I see here is that it brings the user experience further from Magit, which can be a pain point for users who are coming from there. It is explicit in the project readme that the goal is to not reproduce 1:1 magit behaviour, but I still think this point is worth bringing up (even if not given too much weight)

Your idea to collapse the stash list by default is a good one that also helps with the decluttering, but if we're doing that then it seems to me like it is worth considering just putting it in a different view to get the searching upside

What do you think?

Agree that this is the right pattern for many reasons.

  1. Will simplify the code
  2. Stash management will be reachable in one key-press. (don't have to scroll through all staged/unstaged changes or remember a key command to jump to the stash list part of the status window)
  3. Less cluttered main menu. One of my main gripes with lazygit is that the screen is SUPER cluttered. You essentially have to open it in a full-screen for it to be usable.
  4. Consistent with how we deal with branches.

LukeHalasy avatar Oct 09 '23 14:10 LukeHalasy

Hey @LukeHalasy, thanks again for the work here! Mind if I take over this PR and get it finished up?

Piturnah avatar Jan 03 '25 14:01 Piturnah