magit-todos icon indicating copy to clipboard operation
magit-todos copied to clipboard

The usage of faces for filenames is inconsistent.

Open mrcnski opened this issue 5 years ago • 6 comments

Hello again, Old One.

The usage of faces for filenames is inconsistent.

For one of my projects, the filenames look like this:

https://www.dropbox.com/s/tayezuw0vlij4uz/Screen%20Shot%202019-01-10%20at%2011.41.52%20PM.png?dl=0

They are fontified using magit-section-heading, which makes the filenames look like section headings, which I don't really want. I would prefer for them to instead use their own face and to inherit from e.g. magit-section-heading (although I would prefer a different face). This way, I can customize the color of the filenames without changing the look of the rest of magit.

For another project, the filenames look like this:

https://www.dropbox.com/s/81seb4ajcygdxxq/Screen%20Shot%202019-01-10%20at%2011.44.59%20PM.png?dl=0

It's a different color! Upon closer inspection, I discovered that magit-filename is used here.

So, two things:

  1. The inconsistency is kind of confusing as the display of magit-todos changes depending on project. I'm guessing it depends on whether there is one file or multiple.
  2. Magit faces are re-used, instead of defining new ones that simply inherit from existing faces.

I suggest fixing number (2) by introducing two new faces. Then someone can change them both to be the same color if they find two different colors to be confusing/inconsistent.

Speak your thoughts, Old One.

mrcnski avatar Jan 10 '19 22:01 mrcnski

To be clear, I understand the intention here: in the first case, the filename is a collapsible section header that behaves like other section headers. However, I don't want it colored like other section headers, personally, so it would be nice to customize it.

In the second case, it's just a filename, so the magit-filename again makes sense. I don't have a problem with this personally, but again, adding the option to change this face without affecting magit would be nice.

mrcnski avatar Jan 10 '19 22:01 mrcnski

Your analysis is correct. I think the default should remain to apply the heading face to filenames that are headings, but if you want to make that optional, I'll accept a patch.

alphapapa avatar Jan 12 '19 05:01 alphapapa

Are you still interested in changing this? I'm going to release some new versions soon.

alphapapa avatar May 07 '19 10:05 alphapapa

I don't plan on working on this myself, if that's what you're asking.

mrcnski avatar May 07 '19 12:05 mrcnski

Ok, I'll leave it as help-wanted. Thanks.

alphapapa avatar May 07 '19 12:05 alphapapa

So the original screenshots don't work. BWAH! 🤦🏻‍♂️ (I just tried bolding that emoji... didn't worked.) But this package looks better visually than what I remember. There is an improved application of faces here, and so forth and so on. The complaint about inconsistent file faces is still valid, but that's because sometimes filenames are used as section headings, and are correctly fontified as such. Fine!

There still aren't package-specific faces that can be overriden, but I no longer perceive a need for them. The package looks consistent with the rest of magit, to my wandering eye. I suppose that the complaints of the OP (who seems like a cool cat) (that's me btw) are no longer cromulent and may be safely disregarded, at this most critical juncture.

mrcnski avatar Nov 16 '21 23:11 mrcnski