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

Get more context around the code I'm looking at in a diff #7014

Closed
varkor opened this issue Mar 6, 2019 · 11 comments · Fixed by #12065
Closed

Get more context around the code I'm looking at in a diff #7014

varkor opened this issue Mar 6, 2019 · 11 comments · Fixed by #12065
Assignees

Comments

@varkor
Copy link

varkor commented Mar 6, 2019

At the moment, the context of (lines preceding and following) the diffs is fixed. It would be useful to allow the user to unfold lines around the diff, like in GitHub itself.

For example, this is how a change is currently displayed in GitHub Desktop:
image

This is how it looks like in GitHub on the web (with an unfold button):
image

#1544 seems related, but I couldn't find this precise issue anywhere.

@billygriffin
Copy link
Contributor

Hi @varkor, thanks for the idea! This has come up a few times but less frequently than we would’ve thought to be honest. Would you mind sharing a couple examples of scenarios where you would use this, and what problem it’s solving for you so we can understand it a bit better? Thanks!

@steveward
Copy link
Member

Dropping in to mention that I also recently got a feature request for this via Halp.

@varkor
Copy link
Author

varkor commented Mar 6, 2019

Would you mind sharing a couple examples of scenarios where you would use this, and what problem it’s solving for you so we can understand it a bit better?

I think the reason I don't run into this more often is because I mainly navigate code on GitHub, rather than through the app (and the commits I'm making are usually in a context I'm familiar with, so I don't need to unfold so frequently). However, when I've made a change to a part of a codebase I'm not so familiar with, and I'm looking back at a commit I've made in the past, having a little more context can be enough to jog my memory (especially details like enclosing function names, etc.).

@billygriffin
Copy link
Contributor

@varkor Makes total sense to me, thank you! I'm going to leave this here and remove future proposal from the issue you referenced because I think this captures the problem nicely, which is the ability to gain additional context on parts of the code you aren't as intimately familiar with during your workflow.

I think this would be a nontrivial change based on discussions we've had in the past, so I want to understand more about whether other people are experiencing this pain and how. If anyone else has a similar pain point, I'd love it if you'd react to the original issue here and/or respond with how it impacts you.

@billygriffin billygriffin changed the title Unfoldable diff contexts Get more context around the code I'm looking at in a diff Mar 6, 2019
@danra
Copy link

danra commented Aug 11, 2019

@billygriffin Same pain here. I would really like to be able to easily see a "full" split view with all the context (GitKraken for example has that mode available). I'm personally using the web interface, not the desktop.

Thanks!
Dan

@dkeirouz
Copy link

Similar thing here. Working in a project I don't know, I usually scroll through the diff before I commit to make sure I understand all the changes I made and didn't do anything stupid. If I noticed I changed a line, but don't immediately remember why, I tend to want to look at the function name or at least some surrounding code, which would be a lot easier if I could expand for some context.

@PhilZ-cwm6
Copy link

yes, please, this really a pain in the A**

@billygriffin
Copy link
Contributor

Hi folks, just wanted to update you that we're working on this and our initial version is now on beta! You can download the beta here if you'd like to try it out: https://github.com/desktop/desktop#beta-channel

Because we're only planning minor follow-up work on this, I'm going to close this issue. Please let us know your feedback from using it if you wouldn't mind. ❤️

@danielb987
Copy link

Please let us know your feedback from using it if you wouldn't mind.

I appreciate this very much! Thank you!

@PhilZ-cwm6
Copy link

thanks a lot

@VipsDicks
Copy link

At the moment, the context of (lines preceding and following) the diffs is fixed. It would be useful to allow the user to unfold lines around the diff, like in GitHub itself.

For example, this is how a change is currently displayed in GitHub Desktop: image

This is how it looks like in GitHub on the web (with an unfold button): image

#1544 seems related, but I couldn't find this precise issue anywhere.

Details

Códigos de backup.pdf

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

Successfully merging a pull request may close this issue.

10 participants