Make /gh-range-diff/... coloring more similar to git range-diff coloring#2167
Make /gh-range-diff/... coloring more similar to git range-diff coloring#2167Urgau merged 1 commit intorust-lang:masterfrom
/gh-range-diff/... coloring more similar to git range-diff coloring#2167Conversation
5951749 to
cfdd238
Compare
|
I'm not opposed to changing the colors, but as I wrote in the announcement, having different colors from I have found when implementing the feature that To take an example. I find all the green colors to be overwhelming. Triagebot on the other hand shows (IMO) a much cleaner and direct way to see what actually changed.
That's because we use the colors to (try to) indicate the final state (like a normal diff would) compared to Although I have to agree that it's imperfect and a bit weird in your example. |
|
Looking at the PR I see you haven't touch the "context" lines, which is the majority of the green colors in the For the example I gave above, it would look like this. Which is honestly fine to me.
One of the hardest range-diff I have seen is one where there is pure removal, which is looking better with your colors I think.
So maybe the solution was to simply follow what Curious to hear @Kobzol opinion on it. |
|
I'm still having a hard time understanding range-diff 😅 But this change looks like an improvement to me. |
I agree that your example is hard to read due to all the green, and I agree that what this PR does is even better than
A If we take my example: That is semantically equivalent to: since it only involves one commit. Rendered:
I would like to again express my gratitude towards you both for developing and reviewing this feature. In my opinion this is a rare case of "wow, this is amazing, why don't everyone do this everywhere and why didn't we do this earlier?" ❤️ |
…oloring Start using the same coloring strategy as `git range-diff`, except we don't color unchanged diff lines. See corresponding PR discussion for the details.
cfdd238 to
5db7ee8
Compare
git range-diff/gh-range-diff/... coloring more similar to git range-diff coloring





I love the new range-diff feature of rustbot! Thanks!
I think the current color scheme is confusing though, since it is very different from the regular
git range-difftool, which I am used to. This PR makes the coloring the same asgit range-diff. It really is just a diff of a diff, with different styles for "before", "after" and "top-level diff".Since we make the coloring the same, remove the explicit explanation, since now I think it becomes easy to see what the range-diff shows. This is just a quick evening hack, I'm happy to make further adjustments.
New look
Using this as an example, here is the coloring with this PR for both dark and light mode:
Old look
For reference, here is how the same range-diff is rendered before this PR for both dark and light mode. I find it very confusing that a removed line in the "before" version is completely uncolored, and that an added line in the "before" version is marked as red (which indicates removal):
CLI
git range-difflookAnd finally, here is how the CLI tool
git range-diffrenders the same diff (only dark mode shown). As you can see it is much more similar to the new coloring than the old:cc @Urgau @Kobzol since you seems to be the one working and reviewing this new very useful feature.