matklad / pale-fire

Port of Emacs Zenburn theme to VS Code
https://marketplace.visualstudio.com/items?itemName=matklad.pale-fire
72 stars 7 forks source link

Some Checkboxes are hard to see under the "Pale Fire" theme #39

Closed thomcc closed 3 years ago

thomcc commented 3 years ago

TLDR

There's a checkbox which is really hard to see in the "Pale Fire" theme. Really hard to see. Really, really h—... look, maybe just scroll down to look at the screenshots first, then you can come right back to the TLDR.

(What? Yes, it's a lot of scrolling, I promise that screenshots are down there. No, you don't have to read the stuff you're scrolling past, it's just backstory. Why'd I put it then? Look, this is the TLDR. Why would I write a TLDR, but put a line in it that says you need to read the whole damn thing anyway? I'm not a monster)

... Anyway, I think that this checkbox (which I will now call "the bad checkbox") should somehow be made more visible.

Why? Well, I wrote short (but far too long for a GitHub issue!) autobiographical story about how confused I got by misunderstanding the UI.

Also, it's more visible in other themes. Look, scroll down again, further this time, to the part where the section heading says something about "links to screenshots". There's a list in it. Each item in the list starts with a link. That link is a screenshot of the checkbox in other themes, they don't have the issue).

Okay. That's the TLDR. You basically have 90% of the gist of this issue — now I don't have to feel guilty because I wrote over 2000 words about things mostly unrelated to my complaint in someone's GitHub issue tracker, and buried a real problem they probably want to fix in the middle

P.S. Uh, sorry5 about this in advance. Hopefully this... unconventional... issue doesn't leave you so annoyed that you refuse to fix it out of spite7, since IMO it is a real problem. My only defense for all this writing is that I got in a bit of a strange mood, and couldn't stop until was already... out of hand. Too much coffee, maybe? Let's go with that. If you find my writing insufferable (you should already know by now if this is the case), you can probably stop here, or only skim the rest.

Background (Or: Does This Count As A "User Story")

First, a story: Yesterday I started to get some modal popups in VSCode which asked whether I trust the authors of the code in the workspace I was in.

Today, after a few times (I jump around workspaces a lot) I decided to actually read it, probably out of dread for the project I was opening. What I saw was... pretty concerning, In particular, I noticed a line which read: "Trust the authors of all files in parent folder 'src'", and that was located right above the boxes labeled "Yes, I trust the authors" and "No, I don't trust the authors".

Immediately, I thought I had misunderstood what this popup was asking before — that it was actually asking if it was okay to trust my ~/src. Unfortunately, while I could probably be convinced to trust the authors of that workspace6... the same definitely wasn't true for ~/src.

My ~/src folder is a radioactive wasteland. It contains... a lot of complete trash that I just downloaded to read, back when I didn't like reading stuff on GitHub's website (the dark theme improves this, but I still do it sometimes so that I can reformat things I find hard to read). As a result, that folder has some stuff I don't trust, or more-or-less trust, but definitely would rather VSCode not execute (okay, that one should be neutered, but you get the point). Not to mention, my ~/src folder also has a lot of completely unknown code, for example: at least one of those folders in src has a node_modules subfolder containing at least 80 skillion JavaScript dependencies, and I'm not sure I trust any of those.

And so... panic started to set in. I began to worry about everything I'd need to do to as a workaround for this flaw in VSCode's trust model, which seemed to implicitly trust everything inside the parent directory of a trusted workspace:

However, while I considered this, I also began to complain online... At least, until @BlackHoleFox, a friend of mine, pointed out to me: "hm, that's a checkbox".

... Oh.

My fears were unfounded! Turns out: that isn't what that line means! Or... maybe it is, but it isn't a standalone line! It's a line which holds a checkbox — an unchecked checkbox. That is, a checkbox indicating that line does not apply! Phew! I hadn't agreed to let VSCode blindly execute or evaluate every file inside ~/src, or whatever else I was worried it might do.

(Anyway, my guess is: this combination checkbox+label is probably just VSCode's way of letting more careful (err, am I sure careful is the right word to use there?) users permanently dismiss the popup10)

The Evidence Against "The Bad Checkbox" (Or: Fine, You Can Start Here)

Anyway, (regardless of whether or not you think that section "got away" from me...) that problem happened because the background of the checkbox was too hard to see against the background of the modal. Anyway, in case you're unconvinced, I have a screenshot.

Screenshot of a modal popup from VSCode, using the Pale Fire theme. It has a hard to see checkbox.

Do you see it? There's a square to the left of the line beginning with "Trust the authors of all files...". This square is very very slightly lighter than the background. If you're like me, you probably need to look very carefully, and do at least a (minor) exaggerated squint.

If you're still having trouble, here's another screenshot. I've attempted to use the powers of "entering raw HTML into markdown" in order coerce GitHub into rendering this one far larger than it normally would like to (that said, these powers are often forbidden in the name of security, so we shall see...).

Same screenshot as before, but just the problematic checkbox.

See it now? It's to the right of the left of the image, and to the left of the "T". (... Nailed it. That was absolutely the clearest to describe that)

If you're still having trouble seeing it... Then I'm right1! To confirm how right I am, you can probably check the color values of the pixels, like with an image editor, or a tool like "Digital Color Meter"4.

The Part Where I Get To The Point

Anyway, it's time⁷ that I get to the point: I would the Pale Fire theme to find some way to make "the bad checkbox" (described above) more visible. Two decent options are:

I'm aware this is the reduced contrast version of an already low-contrast theme (or at least, zenburn-style themes have used reduced contrast for a while, since it reduces eye strain2, according to some person or people who wrote a README for a text editor theme), but I think that it's worth it regardless.

The Section I Should Just Delete

Currently, the colors here (as reported by "Digital Color Meter") are sRGB 57, 57, 57 and sRGB 60, 60, 60. The first of these is #393939, which shows up in Pale Fire's JSON... but the second is #3c3c3c, which... dunno where that comes from.

That... might mean that VSCode doesn't not let you style this directly. Which might suck and require some hacks. Or maybe it is configurable, but by default it figures it out by blending other colors?

The contrast ratio between these is ~1.047 (this is on a scale from 1 to 21). I'm not sure there are really guidelines for what this should be (probably not the same as the ones for text, since this is still part of the background), and I'm not sure the reduced-contrast variant of a zenburn-based theme should follow any contrast ratio guidelines we could find...

So, I dunno conclusion to make about this, but uh, yeah. Subjectively speaking, a ratio of 1.05 seems too low for me.

More Screenshots Links To Screenshots

I just checked a few other color themes that I have installed (including Pale Fire High Contrast), to see if this is the kind of thing that's bad everywhere, or it should be something we can improve. They all do better, so we should too.

So, all of those seem to do better than Pale Fire here, so it would be nice to get on-par with them.

Far Too Many Footnotes9 (The Real Section I Should Just Delete)

(Note: these footnotes aren't all in order. Sorry. Several started their lives inside parentheses, but when checking for typos, I decided they were too long, too off-topic, or both, so I added them to the list of footnotes... and didn't really feel like renumbering all of them each time I did this... That said, I did go through and make them into links, which was actually much more work, so I should have renumbered them while I was at it. But at this point, maybe I just refuse)

1: This is, of course, just always great news. You love to hear it.

2: I... I think nobody believes this though? Or at least, I don't believe it. I mean, isn't that the... opposite of how it works?

3: Important reasons, like my refusal to admit that I too experience the passage of time, "I kinda think the other one looks prettier", and "I'm more used to it".

4: Digital Color Meter comes with macOS, and I like using it a lot. There's probably something on other OSes, although maybe not build in.

That said, if you're downloading something to install so that you can look at the pixels, then I think you should go with the image editor option instead, since it's a bit more useful, and I'm surprised you haven't gotten one by now.

5: Apparently not that sorry though... Clearly I'm not sorry enough to not do it. And apparently, I'm also not sorry enough to delete any of the footnotes, let alone a paragraph, let alone one of the sections.

Honestly, you're lucky that I even labeled all some11 of the sections that I should delete, so that you know what you can skip.

6: In this case: 'past me', 'distant past me', and 'some GitHub user who submitted a single patch fixing a typo in the README'.

7: Or if not only spite, then a mixture of both spite, and the hope that if you don't fix it, then I won't report this kind of issue in the future8, or at least I won't do so here.

8: Unfortunately, as the saying goes: I will never log off.

9: What? You don't think GitHub issues need footnotes? ... C'mon, it's just my writing style, dude... that kind of restrictive thinking is really harshin' the vibes...

10: I imagine this person will enable the checkbox while wonder to themselves something like "what sort of gormless rube would ever be so foolish as to not only download code that they didn't trust, but to then go and but it into sibling folders of the code they do trust.".

Well, user who I just made up: this sort (you should imagine that I'm pointing at myself in some manner).

11: Nope, that's not true anymore because I changed the name of the "Background" section. (Okay, okay, I've added an explicit notice that you can skip it)

Honestly, you probably skip just about everything except for the pictures, and get a good idea about the rest. You probably should too, would save a lot of time. I guess now isn't the right time to mention this though.

(Alright, I went back and reworked the start. Now it's clear that you don't actually have to put up with my bullshit, even if that would have been a very funny thing to end this with)

lunacookies commented 3 years ago

Wow, thanks for the detailed write-up! I’ll take a look at this later today; hopefully there’s an easy fix.