Skip to content

Add support for showing inline blames #27

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

Closed
wants to merge 5 commits into from
Closed

Add support for showing inline blames #27

wants to merge 5 commits into from

Conversation

psykzz
Copy link
Collaborator

@psykzz psykzz commented May 21, 2018

Fixes #24
Fixes #29

ql9zkjwmsr

@psykzz psykzz mentioned this pull request May 21, 2018
@jbrooksuk
Copy link

This isn't working for me at all. I'm on OSX and no console output.

@jbrooksuk
Copy link

Ah, it does work, it's just slow?

@psykzz
Copy link
Collaborator Author

psykzz commented May 22, 2018

@jbrooksuk I believe it may be a little slow because i use the _async variant.
Try removing that from the on_selection_modified

The downside here is causing UI jank. I'll need to make sure its performant on larger files before we can merge.

@jbrooksuk
Copy link

An option to keep this feature on by default would be 👌

@jbrooksuk
Copy link

jbrooksuk commented May 22, 2018

image

Also, the phantom isn't particulary obvious on a light theme.

@psykzz
Copy link
Collaborator Author

psykzz commented May 23, 2018

For now i just wanted to test the feature worked as expected.
I'll need to do another pass to ensure styles work just as you pointed out.

@pvanb
Copy link

pvanb commented May 23, 2018

I haven't had a chance to try it yet, but it looks good from the demo. Hopefully one day there will be a way to include blank lines, but I can't remember the last time I was interested in blaming a blank line, so it's an acceptable compromise.

A couple of other comments:

  • Showing blames for each line of a selection is a nice addition that I don't think GitLens has either, so 👍
  • I know you're essentially re-using the same template as the command, but the "Git Blame" prefix seems uneccessary (or would be nice to be optional). It takes up valuable space when the thing of most interest is probably the name/time of the commit.
  • Taking that idea further, being able to configure what info to show would be ideal (but that's probably a separate feature request)

@jbrooksuk
Copy link

Taking that idea further, being able to configure what info to show would be ideal (but that's probably a separate feature request)

This could be done using template strings though, that'd be neat.

@psykzz
Copy link
Collaborator Author

psykzz commented May 24, 2018

I know you're essentially re-using the same template as the command, but the "Git Blame" prefix seems uneccessary (or would be nice to be optional). It takes up valuable space when the thing of most interest is probably the name/time of the commit.

Sounds good.

Taking that idea further, being able to configure what info to show would be ideal (but that's probably a separate feature request)

I agree the idea is easy but i think let's keep this PR small and have that in another PR.

@jbrooksuk
Copy link

Can we have an option to have this enabled all of the time?

@psykzz
Copy link
Collaborator Author

psykzz commented May 24, 2018

I don't see why not. I haven't gotten around to having settings just yet but can set that up later tonight.

@pvanb
Copy link

pvanb commented Jul 24, 2018

A couple of additional things I've noticed:

  1. If I'm adding to the end of an existing line where the annotation extends beyond the window width (i.e. there's horizontal scrolling) there's a lot of flickering happening as I type with the line moving left/right. Presumably there's some position re-calculating happening?

  2. If I add new lines, they show up as (Not Committed Yet) with a commit hash of 000000000000 which is as expected. However after I've committed (and pushed) the change I'm still seeing the uncommitted annotation, even after re-opening and re-toggling the inline feature.

@psykzz
Copy link
Collaborator Author

psykzz commented Jul 25, 2018

Looking for help to finish off this pull request, if anyone is interested poke me and I'll set it up.

@frou
Copy link
Owner

frou commented Jul 28, 2020

@psykzz Apologies, I did not notice this PR has been laying open for so long. Are you still migrated away from Sublime Text?

I'm pretty sure there will be tons of merge conflicts even after I revert some stuff, so maybe we should just close out this PR? The diff will still be on record to refer to in future if implementing this style of feature.

@psykzz
Copy link
Collaborator Author

psykzz commented Aug 26, 2020

@frou I have yeah, pretty much migrated to VSC today. Happy to close it off. 👍

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.

Author/commiter names with more than one space not being parsed correctly GitLens like functionality
4 participants