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

Show commit authors in different colors #199

Open
miguelcg opened this issue Aug 8, 2017 · 10 comments
Open

Show commit authors in different colors #199

miguelcg opened this issue Aug 8, 2017 · 10 comments

Comments

@miguelcg
Copy link
Contributor

miguelcg commented Aug 8, 2017

As an enhancement, I think it could be nice to show every author in a different color so it's easier to recognise the different authors.

@alexcorre
Copy link
Owner

thanks @miguelcg i like this feature. I'd be happy to accept a pull request where this is an configurable option instead of the default commit color differentiation

@miguelcg
Copy link
Contributor Author

miguelcg commented Aug 9, 2017

I can work on this, feel free to assign it to me. Just a minor clarification, what do you mean by the default commit color differentiation? You mean the dark/light background of each row? Thanks

@alexcorre
Copy link
Owner

alexcorre commented Aug 9, 2017

yes. right now the default logic is to make adjacent commits alternate dark / light regardless of author. its very subtle.

image

relevant code here: https://github.com/alexcorre/git-blame/blob/master/lib/util/BlameGutter.js#L106-L117

@miguelcg
Copy link
Contributor Author

miguelcg commented Aug 9, 2017

Thanks @alexcorre, I'll give it a go and see how it looks 😄

@miguelcg
Copy link
Contributor Author

miguelcg commented Aug 9, 2017

Do you like how it looks?
screen shot 2017-08-10 at 00 06 34

Since it's just a subtle way to distinguish different authors quickly and not colouring the whole cell, do you still want it as a configurable option or do you want to make it the default view?

@alexcorre
Copy link
Owner

not in love with the colors, can we grab some colors from the theme? i think there is a way to use color vars that are set by the theme? don't have time to look it up this second but i think this will help it to match whatever style the person has set up on their particular instance of atom

lets make it an option, but can default it to true

@alexcorre
Copy link
Owner

also...does it conflict with linter or git status indicators on the lines? Can you show a screenshot alongside that?

@miguelcg
Copy link
Contributor Author

The colours are generated "uniquely" for each author based on its name (same name would always generate the same colour). I don't know about the color vars, I would have to investigate about it.
I have to check if it conflicts with linter or git status indicators on the lines, I can't right now though.

@miguelcg
Copy link
Contributor Author

miguelcg commented Aug 14, 2017

This is how it looks with the default git status:
screen shot 2017-08-14 at 21 29 01

I haven't tried with the linter but it shouldn't interfere since the indicators are next to the line numbers instead of next to the commit authors.

@alexcorre
Copy link
Owner

great thanks for your help. go ahead and open a PR and i'll review the code

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

No branches or pull requests

2 participants