cypht icon indicating copy to clipboard operation
cypht copied to clipboard

Coloring the messages in list to get a fast overview of the account they belong to

Open codiflow opened this issue 3 years ago • 9 comments

🗣 Suggestion

I'd like to have a fast overview if there are (important) mails from some of my accounts in my inbox. As I added 9 accounts its sometimes a bit messy in my inbox. To keep me informed it would be great to have a color attached to every smtp account which gets applied as a background (or marker or anything else) so see to which account the incoming mail belongs to.

As I'm firm with PHP, CSS and HTML I would implement this feature but first I wanted to ask, if there were feature requests like mine in the past or if theres an easier way to implement this. My plan was to add a seperate field to the IMAP servers with the color which is then used for this. So I can easily change this for every account if I need to.

I found this answer on a closed issue but I don't know where to apply this styling and if thats really what I had in mind: https://github.com/jasonmunro/cypht/issues/20#issuecomment-146524094

Unbenannt

I would be happy to build this feature as I think this would improve my productivity a lot :-)

codiflow avatar Jan 11 '21 22:01 codiflow

This is a fantastic idea! I will use it!

A related idea: https://github.com/jasonmunro/cypht/issues/9 (I would add colors to messages from certain people)

Thanks!

marclaporte avatar Jan 12 '21 19:01 marclaporte

For those who want a "fast fix" for that: Every "message row" has the whole emailaddress / smtp account name set as css class name. So styling it in your browser is no big thing.

So just add this to have a red background on every email from that account for example: .my\@mailaddress\.com { background-color: red }

codiflow avatar Jan 12 '21 20:01 codiflow

Using the Firefox addon Stylus this took me 5 minutes:

grafik

codiflow avatar Jan 12 '21 20:01 codiflow

Thank you @codiflow! This is a great quick workaround until we figure out a built-in solution.

marclaporte avatar Jan 12 '21 23:01 marclaporte

This is a neat idea. @codiflow your solution is exactly how I was thinking we should code this up. We can create a new module set, and for each account you can pick background/foreground colors, and then we use the row classes you identified to apply the CSS rules. Should be a pretty easy module set to build.

jasonmunro avatar Jan 15 '21 16:01 jasonmunro

Initial version of a "highlight" module set is pushed to master. I have not added it to the sample ini yet but you can enable it with:

modules[]=highlights

It supports rules to alter background or text colors based on 3 sources (E-mail, RSS, Github) and within each you can setup per source limits (so just E-mail account foo for example, or E-mail accounts foo + bar), AND for E-mail you can also add a flag (unseen, flagged, etc). Finally each rule can also have the CSS !important flag set to force an override of a previously applied rule.

Just committed this and so far testing is good but it likely has some kinks to work out.

jasonmunro avatar Jun 08 '21 00:06 jasonmunro

For the record, here is the code: https://github.com/jasonmunro/cypht/tree/master/modules/highlights

marclaporte avatar Feb 02 '22 00:02 marclaporte

I saw this in another webmail client, and I liked it: A color for flagged messages.

marclaporte avatar Feb 02 '22 00:02 marclaporte

I saw this in another webmail client, and I liked it: A color for flagged messages.

well good thing the highlight module set already supports that :)

jasonmunro avatar Feb 02 '22 00:02 jasonmunro

This already exists: 2024-05-01_135458

marclaporte avatar May 01 '24 17:05 marclaporte