Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LukeHalasy
Copy link
Contributor

@LukeHalasy LukeHalasy commented Oct 7, 2023

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

@LukeHalasy LukeHalasy changed the title adds the ability to view stash in status window and pop individual stash entries Adds the ability to view stash in status window and pop individual stash entries Oct 7, 2023
@LukeHalasy
Copy link
Contributor Author

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

@LukeHalasy
Copy link
Contributor Author

LukeHalasy commented Oct 7, 2023

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)

@Piturnah
Copy link
Owner

Piturnah commented Oct 9, 2023

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?

@LukeHalasy
Copy link
Contributor Author

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.

@Piturnah
Copy link
Owner

Piturnah commented Jan 3, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants