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

Fix regression in Magit themes #317

Merged
merged 5 commits into from Aug 9, 2019
Merged

Fix regression in Magit themes #317

merged 5 commits into from Aug 9, 2019

Conversation

tarsius
Copy link
Contributor

@tarsius tarsius commented Nov 22, 2018

This isn't done yet. Actually I haven't even begun to work on it yet and for now this pr only contains some preparatory commits.

Theming Magit faces is quite difficult. I have written a 1300 word text on the matter, and that merely mentions the things one has to be aware when doing so. If someone attempts to do it without reading and understanding that, then the likelihood of breaking functionality is very high, as has happened in #300.

Just because I have written that text doesn't mean it is easy for me to do that. Fixing the regression introduced by #300 will be difficult, if we don't just revert it. But I don't want to do that because I think the new base colors actually do look better.

And then I got side-tracked of course (see #315 #316). I don't know when I will return to this, so I will just mention what the issue is, in case there are bug reports:

It is wrong to use the same color for "word-level differences" (diff-refine-*) and highlighting (magit-diff-*-highlight) of the current diff. The current diff, like any diff, may contain word-level differences; we don't want them to become invisible when we are "narrowing in" on them.

@larstiq
Copy link

larstiq commented Jan 4, 2019

How can we get this moving forward? I'd love to get my diff-refinement in magit back. There certainly seem to be related issues filed, like #305

@tarsius
Copy link
Contributor Author

tarsius commented Jan 4, 2019

I won't work on this in January, sorry.

@bbatsov
Copy link
Owner

bbatsov commented Jan 26, 2019

No worries, take your time.

@bbatsov
Copy link
Owner

bbatsov commented Mar 16, 2019

@tarsius Will you be coming back to this at some point?

@manuel-uberti
Copy link
Contributor

@tarsius friendly ping. :)

@tarsius
Copy link
Contributor Author

tarsius commented Jul 2, 2019

I'll try to have a look ~ next two weeks.

Make the definitions of Magit's Zenburn faces look like those of the
Solarized theme.  I now use the latter but used to use the former,
and making this look similar for both themes makes it easier for me
to fix the regressions introduced by others.

Do the same for the diff faces.
Make the definitions of Magit's Zenburn faces look like those of the
Solarized theme.  I now use the latter but used to use the former,
and making this look similar for both themes makes it easier for me
to fix the regressions introduced by others.
This reverts commit 8856da4 from
pull-request #300.

Also see #317.

The goal of that commit was to make the diffs prettier by making them
darker, which I agree was a success.  Unfortunately the diffs not only
got prettier but also lost information.

The `diff-refine-*' faces quite obviously must be different from the
`magit-diff-*-highlight' faces and the commit being reverted violated
that in the most explicit way possible by making the latter inherit
from the former.

The refinement or "word-level" faces are used to change the parts of
a line that changed.  The highlighting faces are used to emphasize
the "selected" part of a diff, e.g. the part of the diff the user is
currently concentrating on by placing the cursor inside that part of
the diff.  Obviously if one concentrates on a part of a diff, then
one does not want that part to become *less* informative until one
focuses elsewhere.

I tried fixing this regression without going as far as to completely
reverting the faulty commit, unfortunately I was unable to do so.
@tarsius
Copy link
Contributor Author

tarsius commented Aug 9, 2019

I have tried to fix this without going as far as to completely revert the original change, but I did not succeed and so I have completely reverted it after all. I think you should merge this now.

If someone else would like to use darker colors for diffs, then here are my suggestions: Make the word-level differences darker and more saturated than the basic diff colors, and make the highlighted basic colors lighter than the basic diff colors. The current colors follow this logic already--just make every color darker.

@bbatsov bbatsov merged commit e5a4dd7 into bbatsov:master Aug 9, 2019
bbatsov pushed a commit that referenced this pull request Aug 9, 2019
This reverts commit 8856da4 from
pull-request #300.

Also see #317.

The goal of that commit was to make the diffs prettier by making them
darker, which I agree was a success.  Unfortunately the diffs not only
got prettier but also lost information.

The `diff-refine-*' faces quite obviously must be different from the
`magit-diff-*-highlight' faces and the commit being reverted violated
that in the most explicit way possible by making the latter inherit
from the former.

The refinement or "word-level" faces are used to change the parts of
a line that changed.  The highlighting faces are used to emphasize
the "selected" part of a diff, e.g. the part of the diff the user is
currently concentrating on by placing the cursor inside that part of
the diff.  Obviously if one concentrates on a part of a diff, then
one does not want that part to become *less* informative until one
focuses elsewhere.

I tried fixing this regression without going as far as to completely
reverting the faulty commit, unfortunately I was unable to do so.
@bbatsov
Copy link
Owner

bbatsov commented Aug 9, 2019

Thanks!

@tarsius tarsius deleted the magit branch November 8, 2019 15:59
archit-rastogi pushed a commit to archit-rastogi/zenburn-emacs that referenced this pull request May 24, 2020
This reverts commit 8856da4 from
pull-request bbatsov#300.

Also see bbatsov#317.

The goal of that commit was to make the diffs prettier by making them
darker, which I agree was a success.  Unfortunately the diffs not only
got prettier but also lost information.

The `diff-refine-*' faces quite obviously must be different from the
`magit-diff-*-highlight' faces and the commit being reverted violated
that in the most explicit way possible by making the latter inherit
from the former.

The refinement or "word-level" faces are used to change the parts of
a line that changed.  The highlighting faces are used to emphasize
the "selected" part of a diff, e.g. the part of the diff the user is
currently concentrating on by placing the cursor inside that part of
the diff.  Obviously if one concentrates on a part of a diff, then
one does not want that part to become *less* informative until one
focuses elsewhere.

I tried fixing this regression without going as far as to completely
reverting the faulty commit, unfortunately I was unable to do so.
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.

4 participants