mozilla/fathom

Trainer timing histogram does not work for dark terminals.

danielhertenstein opened this issue · 4 comments

Because I use a terminal with a black background, my foreground is white. When we create the histogram chart string, we set the background color to white, and my histograms always show up as white on white.

@erikrose: Is the color formatting necessary at all? Without it, the histogram shows up white on black as other text does on my terminal. Did you run into problems without it?

The reason for the background color is to delimit the bounds of the chart. Otherwise, a chart like…

0 ▁▂▃▄  36

…looks like there's a steady climb to 36, when, in fact, there is a zero bar on the right. (It looks more ambiguous in my terminal than here.) We could set the foreground color to black explicitly; everywhere else, I make sure to set fg abd bg color together so terminal background isn't a factor. Or we could put noisy chars around the chart, like…

0 [▁▂▃▄ ] 36

It's uglier, but it has the practical advantage of pasting nicely into Bugzilla tickets and the like.

I have a slight preference for the brackets, but I'm happy either way. Do you have a preference?

Actually, how about…

0 |▁▂▃▄ | 36

A little less visual noise. And, in the fonts here and in my terminal, they align better with the baseline.

I like that. I'll put up a PR.