mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #20] Add more classes to enhance styling possibilities #18
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @R-J on GitHub (Oct 5, 2015).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/20
Originally assigned to: @jasonmunro on GitHub.
By now the source (Account /Feed Name) is only available in a TD element inside of a TR element. if the source is added as a class, users can add their own styling based on the account.
The Unseen class is in a DIV that is a child of the subject TD. I think that class should also be given to the TR element, so that styling of the complete message in the list is possible.
@jasonmunro commented on GitHub (Oct 5, 2015):
I'm happy to add any classes that could be useful!
@R-J commented on GitHub (Oct 5, 2015):
Wow, thanks for that prompt reply! I thought of doing a pull request to support your work (and make my wish faster come true), but I found that it would need to change the way the core
function message_list_row($values, $id, $style, $output_mod)works. And so you have to decide how to design that change.The message_list_row function already has a $style parameter which I thought would be the best name for the style of the row, but by now it is a news/email flag. I would use $style for the table rows style and use a parameter called $type which holds the email/news information.
Another option would be to make $style of type array and do a
if (in_array('news', $style))wherever you've usedif ($style == 'news')before. The actual style for TR could then be animplode(' ', $style)But all that results in the need to weak a) the message row function and b) all modules that use this function. By now this seems to be "only" 6 files ;)
When it comes to styling, I would set classes at the highest possible level since in CSS you have selectors for childs, but not for parents.
@jasonmunro commented on GitHub (Oct 5, 2015):
Thanks for the detailed follow up! You are right, this is not quite as painless as I thought, but definitely still worth doing. I should have some time tonight and tomorrow to get this done, I will update the thread when I do!
@jasonmunro commented on GitHub (Oct 6, 2015):
Changes to support this are committed:
Update the message_list_row() function to allow for additional row classes:
github.com/jasonmunro/hm3@6659c03345Update module sets using message_list_row() to pass additional information to set the row class. Currently sets will set the source, the "type" (email/feeds/github/etc), and an "unseen" class if the item has that status. No CSS has been changed to use these classes as of yet:
github.com/jasonmunro/hm3@a77d9155b4Thanks again for the feedback, and let me know if you run into any trouble!
@jasonmunro commented on GitHub (Oct 6, 2015):
I also just also changed the css around "unseen" so that only the subject is highlighted and not the entire row (maintaining the existing behavior)
@dumblob commented on GitHub (Oct 6, 2015):
Nice modifications, thanks.
@jasonmunro commented on GitHub (Oct 6, 2015):
This broke a few things (which I think I have all fixed), specifically around how we use the message list row class in the browser. A better fix than my hacks, is to move the row "id" value the js uses to an actual id attribute and not as a class attribute. It's on my list!
@jasonmunro commented on GitHub (Oct 6, 2015):
Along the sames lines as this request, I just added a message list specific class to the containing div for message list views. Now rows styles can be combined with that for per-message-list specific styles:
.unread_list table .email td { background-color: green; }
Not sure how handy this is, but might be nice for themes to be able to color-code rows in combined views only without effecting all message lists.
@R-J commented on GitHub (Oct 8, 2015):
That's a great thing! I named my accounts like my mail addresses and so I had to test a little while until I achieved what I wanted:
The "." and the "@" signs have to be escaped and I needed an "!important" in my css. I've saved that lines in a "custom.css" file and added
@import url("custom.css");at the top of site.css. Now I have colored markers for different accounts, while unread messages get a fat border and read messages only a small!But I have the following problem: I have two different accounts and one stopped working after using the current master branch. While both list views (
?page=message_list&list_path=imap_0_INBOXand?page=message_list&list_path=imap_1_INBOXshow correct results, all the combined views only include imap_1Since I suspect this is a result of the changes made for this issue, I didn't create a new issue.
@jasonmunro commented on GitHub (Oct 8, 2015):
Weird! I'm not seeing that problem. First thing to double check is that the time limit for a combined view is not set so short that it excludes all messages from that account (for example, if you have the "unread since" setting for the unread combined view set to 1 week, but you don't have any messages in that account for the last week). The next thing to look at is the "sources" dropdown in the upper right (it's the folder icon). Are both accounts listed as sources for combined views? Finally, count the number of AJAX requests fired off when you load a combined view. It should be at least 1 per source. Also, make sure you have hard refreshed in your browser to force the latest js code to be used - if the js was stale you could see weird issues like this.
I'm not sure how the latest changes could break just 1 of 2 accounts, but it's possible. What name did you give the account that is missing? I wonder if there is something about that causing the problem. That is all I can think of for now - let me know what you find out!
@jasonmunro commented on GitHub (Oct 8, 2015):
FYI, You can do this without changing the existing modules by putting your css in modules/site/site.css. It will automatically be included in the combined/minified css output. This will include it after the main css, so you might not need the !important attribute anymore (just depends on the style, you still might need it).
@R-J commented on GitHub (Oct 9, 2015):
Thanks for the modules/site/site.css hint!
I've sent you more details about my problem by mail - and guess which mail client I've used!
@jasonmunro commented on GitHub (Oct 9, 2015):
Nice! I'm sure we can figure out what is going wrong. I'm going to close this thread since the original request is done. Don't hesitate to open a new issue if you need to!