Closed
Bug 147448
Opened 23 years ago
Closed 23 years ago
Mailnews theme: duplicate images / css rules
Categories
(SeaMonkey :: Themes, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: hwaara, Assigned: hwaara)
Details
Attachments
(2 files)
4.91 KB,
patch
|
janv
:
review+
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
2.70 KB,
patch
|
janv
:
review+
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
In the Modern theme's CSS, there are a lot of rules for watched/ignored threads
and images that are duplicates. We could optimize this a bit.
For example:
treechildren:-moz-tree-image(news, threadCol, container, hasUnread, watch, open) {
list-style-image: url("chrome://messenger/skin/icons/thread-new-open-eye.gif");
}
uses the exact same image as:
treechildren:-moz-tree-image(news, threadCol, container, hasUnread, watch) {
list-style-image: url("chrome://messenger/skin/icons/thread-new-closed-eye.gif");
}
So basically we make no distinction between open and closed threads in the
watched/ignored icon, which makes sense, so let's remove the bloat.
BTW, I haven't investigated if Classic is optimizable too.
Assignee | ||
Comment 1•23 years ago
|
||
"But wait, there's more!" Even ancient theme rules like these are duplicate:
treechildren:-moz-tree-image(threadCol, container) {
list-style-image: url("chrome://messenger/skin/icons/thread-closed.gif");
}
treechildren:-moz-tree-image(threadCol, container, open) {
list-style-image: url("chrome://messenger/skin/icons/thread-open.gif");
}
We could have just one "thread.gif" instead of two duplicate with different names.
Assignee | ||
Comment 2•23 years ago
|
||
Taking to investigate if I can just remove the redundant images and rules (maybe
it will speed us up, who knows, it can't hurt).
Assignee: shliang → hwaara
Assignee | ||
Updated•23 years ago
|
Summary: Watched/Ignored threads: duplicate code → Mailnews theme: duplicate images / css rules
Assignee | ||
Comment 3•23 years ago
|
||
OK, I tested it, and as expected, the rules (and images) are just plain
redundant. Luckily, this is only for threads, and not for any other aspect of
the mail theme (for modern).
Assignee | ||
Comment 4•23 years ago
|
||
I'll investigate Classic tomorrow. Feel free to review the patch, so we can
unload the thread pane a bunch of CSS rules and images. :-)
Assignee | ||
Comment 5•23 years ago
|
||
Yep. The duplication is only in the Modern theme; the Classic theme actually
distinguishes between e.g., closed and open threads.
Comment 6•23 years ago
|
||
Comment on attachment 85201 [details] [diff] [review]
Patch to Modern
r=varga
Attachment #85201 -
Flags: review+
Assignee | ||
Comment 7•23 years ago
|
||
Additional patch needed to remove these files from Modern's jar.mn also.
Comment 8•23 years ago
|
||
Comment on attachment 85262 [details] [diff] [review]
Additional patch to jar.mn
r=varga
Attachment #85262 -
Flags: review+
Comment 9•23 years ago
|
||
those images may be place holders for images that we don't have yet.
meaning, the rules may be correct, we just didn't have images yet so we copied
existing images.
Assignee | ||
Comment 10•23 years ago
|
||
When I asked hewitt about this on IRC he said it sounds like a bug...
Assignee | ||
Comment 11•23 years ago
|
||
Sorry, I mean on AIM.
Comment 12•23 years ago
|
||
> So basically we make no distinction between open and closed threads in the
> watched/ignored icon, which makes sense, so let's remove the bloat.
now I get it. sr=sspitzer on both patches.
yes, we don't make any distinction between open and closed in the thread icon.
reducing our css rules is good (for performance), and removing duplicate images
is good (makes our .jar file smaller, faster to load and reduces the size of the
download.) good work, hwaara.
next we should also fix classic (same problem there, I checked). for extra
points, we should rename the files and remove "closed" from the names. that
doesn't have an impact on performance, so that can be spun off to another bug.
Updated•23 years ago
|
Attachment #85201 -
Flags: superreview+
Updated•23 years ago
|
Attachment #85262 -
Flags: superreview+
Comment 13•23 years ago
|
||
> next we should also fix classic (same problem there, I checked)
oops, classic is correct as is. hwaara points out that classic did make the
distinction between open and closed thread icons. (the thread in the spool was
long or short depending on if the thread was open or closed.)
I still think we should spin up a new bug about removing "closed" from the name
of the modern icon files, but not fix it right now. it's a minor tweak, more
for our (developer's) benefit.
Assignee | ||
Comment 14•23 years ago
|
||
bug 147945 posted for the remaining thread-closed image files to be renamed, and
all patches checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 15•23 years ago
|
||
possible fallout: bug 148040
Comment 16•23 years ago
|
||
forget comment 15 (is likely a fallout from bug 130544)
Updated•17 years ago
|
Product: Core → SeaMonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•