Jump to content

Rich text formatted snippets don't support Dark Mode


Recommended Posts

6 hours ago, Andrew said:

Did you paste that rich text in to the snippet editor? If so, the rich text will likely contain colour information which Alfred is respecting.

 

Yes, I probably pasted this from someplace else — but the rich text formatting that I needed was simply hyperlinks.

 

In Light Mode, it looks "correct" — the background has light and the text is dark, but in Dark Mode, the background changes but the text color doesn't.

 

I suppose folks might set the color of text, but in the case of black/default text, would it make sense to switch to a light color?

 

image.thumb.png.a2d966bd0cf87394d3384155cd52a8bd.png

Link to comment
3 hours ago, Chris Messina said:

I suppose folks might set the color of text, but in the case of black/default text, would it make sense to switch to a light color?

 

To what ends? Alfred is showing you what your text will look like when you paste it into a document. If you can't read it in Alfred, it won't be visible in any email you insert it into till the sun comes up, either. Would it not be preferable to remove the colour from the text than have Alfred misrepresent it?

Link to comment
25 minutes ago, deanishe said:

To what ends? Alfred is showing you what your text will look like when you paste it into a document. If you can't read it in Alfred, it won't be visible in any email you insert it into till the sun comes up, either.

 

This is not correct. When I paste it into a document, the text respects the system color mode:

https://www.dropbox.com/sh/k6z72w28zfb4ffe/AAB7WET6Tj18EEbFxYJqDC_ma?dl=0

 

1 hour ago, deanishe said:

Would it not be preferable to remove the colour from the text than have Alfred misrepresent it?

 

I'm not sure what the answer is as far as RTF goes, but the current preview in Alfred's Snippets Editor doesn't correspond with the appearance of the text when I paste it into other apps in Dark Mode. 

Link to comment
11 hours ago, Chris Messina said:

When I paste it into a document, the text respects the system color mode

 

You misunderstand. It's not about respecting the system colour mode, it's about not messing with the text the user actually entered into Alfred.

 

Colourless text and black text are not the same thing. Why should Alfred start lying to everybody about the colour of the text – making them think the black or white text they thought they’d entered is actually colourless – just because you personally don’t care about the difference?

  

11 hours ago, Chris Messina said:

the current preview in Alfred's Snippets Editor doesn't correspond with the appearance of the text when I paste it into other apps in Dark Mode

 

Seems to me, what the text looks like in the email that comes out the other end is much more important. The app you're writing your email in might be smart enough to flip the display colours. How much would you be willing to bet that all those Windows and webmail clients that the people you write to are using are just as smart?

Edited by deanishe
Link to comment

Alfred's snippet editor does actually respect the absence of colour in the RTF as "system text colour", which is why if you create a RTF snipping within Alfred's snippet's preferences, you'll see the light / dark mode colour changing.

 

For your convenience, Alfred will also does a few things under the hood to automatically assume a colour choice as removing the colour, so in your RTF snippet, show the colours, select ALL, and set the colour to Black, and Alfred will assume you meant no colour, then you'll see your snippet show light and dark modes in the snippet editor.

 

This is actually a really interesting and quite difficult conundrum, as different apps treat the paste differently from RTF, so I took the approach of if the RTF has colour set, then respect this colour set as it's less likely to contradict what the user wants. Having said that, I am always willing to re-look at behaviour like this if it ever becomes of interest to the wider community.

 

For now, if you re-set the colour, or if you create snippets within Alfred's editor itself, you'll get the colour changing as you expect.

 

Cheers,

Andrew

Link to comment
19 minutes ago, Andrew said:

show the colours, select ALL, and set the colour to Black, and Alfred will assume you meant no colour

 

How about a "Remove text colours" option in the formatting dropdown? Seems to me that anybody who does care whether text is black or colourless would want black text to be displayed in black (even if it is hard to read), and anyone who doesn't care, like Chris, would probably be better served with colourless text anyway.

Edited by deanishe
Link to comment
6 hours ago, Andrew said:

Funnily enough, this is pretty much the solution I had discussed through with Vero this morning :)

 

This seems like the most direct/intuitive approach and to @deanishe's point, for people who do want to specify Black Text intentionally, their preference will be preserved, and for people like me, who want the text to be the System Text Color, I'll get the behavior I expect.

 

I understand the conundrum in terms of copying text from another context into Alfred, and Alfred respecting the foreign text color setting — but since I was unaware of this subtlety, the behavior left me with a false impression.

 

@Andrew I went ahead and did as you suggested and set the text color to Black and now it behaves as I expected, but technically not as a I specified! Since I set the text to Black, to @deanishe's point, the text should have stayed Black when I toggled into Dark Mode, but that's not what happened: 

 

image.thumb.png.e8e3d3c9fb711884e9fec4cefb851ad1.png

 

The Mac color picker actually accounts for this ambiguity by providing a "clear" color in TextEdit:

 

5597759_CleanShot2021-05-28at10_39.49@2x.png.268626a8b237e201282367c262b91e89.png

 

Perhaps offering something equivalent to that would address this issue to everyone's satisfaction?

 

Link to comment
47 minutes ago, Chris Messina said:

The Mac color picker actually accounts for this ambiguity by providing a "clear" color in TextEdit

 

It doesn't actually do anything, though (at least not on Catalina). There doesn't appear to be any way to distinguish uncoloured text from black/white text in TextEdit without looking at the raw RTF or copy-pasting the text into another app.

Edited by deanishe
Link to comment
×
×
  • Create New...