Closed
Bug 233791
Opened 22 years ago
Closed 21 years ago
toolbar button jumps when marking a message as junk (or not junk)
Categories
(SeaMonkey :: MailNews: Message Display, defect)
SeaMonkey
MailNews: Message Display
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mscott, Assigned: Stefan.Borggraefe)
References
Details
Attachments
(2 files, 2 obsolete files)
2.64 KB,
patch
|
Details | Diff | Splinter Review | |
3.81 KB,
patch
|
neil
:
review+
Stefan.Borggraefe
:
superreview+
|
Details | Diff | Splinter Review |
toolbar button jumps when marking a message as junk (or not junk)
to reproduce
1) make sure the toolbar has the "junk" button, and buttons to the right of it.
2) make sure you are showing text or pictures and text in the toolbar buttons
3) make sure you aren't moving messages automatically when you mark them as junk
4) select a message, mark it as junk
because the button changes from "junk" to "not junk" the buttons to the right of
the junk buttons will jump over to the right.
a possible solution would be to pad the button enough to make the button wide
enough to hold "not junk", so that when it says "junk" it won't be narrower.
perhaps this width would be in ems and specified in the dtd file, as it would
vary per language, as the length of "not junk" varies.
Reporter | ||
Comment 1•22 years ago
|
||
bug #233790 covers the tbird case.
Comment 2•22 years ago
|
||
Dupe of bug 208122? May be theme-specific.
Assignee | ||
Comment 3•21 years ago
|
||
The modern theme has the same issue when either the font size is large enough or
the translation of "Not Junk" is longer.
Assignee: sspitzer → Stefan.Borggraefe
Severity: normal → trivial
OS: Windows 2000 → All
Hardware: PC → All
Assignee | ||
Comment 4•21 years ago
|
||
*** Bug 208122 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 5•21 years ago
|
||
Since this is not theme specific but localization-specific, I chose to fix this
bug directly in the XUL-file by adding a min-width and then externalizing it.
This is ugly, but I can't think of a better way to fix this. :-( Ideally we
would calculate the widths of the strings and then use the maximum of these two
values. AFAIK this is not possible with XUL.
Assignee | ||
Comment 6•21 years ago
|
||
Comment on attachment 143933 [details] [diff] [review]
Patch
Neil, do you think this is acceptable?
Attachment #143933 -
Flags: review?(neil.parkwaycc.co.uk)
Reporter | ||
Comment 7•21 years ago
|
||
I actually like this approach. The minimum width of this button really is driven
by localization and not theme style, so allowing it to be controlled by the
localizers (as a style attribute in xul) instead of in a css theme file seems
like a good thing.
At least for me, I was able to shrink this width all the way down to 4.2em
before the button ran out of horizontal room. This could be because I am using
large fonts or because I was trying it directly in thunderbird which may have
some other padding rules on toolbar buttons that influenced this. I need to
figure out why that is.
Assignee | ||
Comment 8•21 years ago
|
||
I found a way to get Mozilla to calculate the correct width for us. :-)
Scott: The needed width for the previous patch was dependent on the used font.
Before I found the new solution in this attachment I tested more and found that
if you use a monospace font you nearly need a width of <number of
characters>em.
The new patch doesn't have this issue, so let us all forget these worries of
the past. ;-)
Assignee | ||
Updated•21 years ago
|
Attachment #143933 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #143933 -
Flags: review?(neil.parkwaycc.co.uk)
Assignee | ||
Updated•21 years ago
|
Attachment #144024 -
Flags: review?(neil.parkwaycc.co.uk)
Reporter | ||
Comment 9•21 years ago
|
||
Yup, good detective work. I was using a monospace font. That's why I was able to
shrink the number so much.
Reporter | ||
Comment 10•21 years ago
|
||
had to make some tweaks to work nicely with custom toolbars
Comment 11•21 years ago
|
||
Can this be fixed to not spew js console output when the junk button isn't on
the toolbar?
Error: junkButtonDeck has no properties
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 594
Reporter | ||
Comment 12•21 years ago
|
||
sorry about that Stephen. I fixed that issue (which was specific to the
thunderbird patch due to customizeable toolbars).
Reporter | ||
Comment 13•21 years ago
|
||
Comment on attachment 144024 [details] [diff] [review]
Patch V2
I like this approach a lot because it minimizes the work localizers will have
to do compared to the previous solution. Plussing this...pending Neil's r of
course.
Attachment #144024 -
Flags: superreview+
Comment 14•21 years ago
|
||
I have filed bug 238141 which deals with a regression in Thunderbird that this
patch has caused. The junk toolbar icon displays the wrong icon when it is in
the disabled state.
Assignee | ||
Updated•21 years ago
|
Attachment #144024 -
Flags: review?(neil.parkwaycc.co.uk)
Assignee | ||
Comment 15•21 years ago
|
||
Updated patch for Seamonkey that fixes the problem Adam described. Thanks for
reporting this Adam! :-)
Assignee | ||
Updated•21 years ago
|
Attachment #144024 -
Attachment is obsolete: true
Assignee | ||
Comment 16•21 years ago
|
||
Comment on attachment 144443 [details] [diff] [review]
Patch V2.1
Transferring Scrotts sr+ and rerequesting review from Neil.
Attachment #144443 -
Flags: superreview+
Attachment #144443 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 17•21 years ago
|
||
I wasn't sure if Seamonkey also experienced the problem I described. I hope you
will be making a thunderbird version of the patch so that it will be fixed as
well. I just patched my version of Thunderbird with the updated seamonkey patch
V2.1 (with a little fixing up to make it work with Thunderbird) and it works.
Comment 18•21 years ago
|
||
Unfortunately themes will assume that button-junk refers to a toolbarbutton and
design their style rules appropriately... at the very least this patch slightly
breaks classic and modern, and probably most (cough!) 3rd party themes too.
An alternative that did occur to me would be to highlight the button if the
message is junk, in much the same way as Composer's Bold button, JS Console's
All button or DOM Inspector's Select Element button highlights. Thoughts?
Assignee | ||
Comment 19•21 years ago
|
||
(In reply to comment #18)
> Unfortunately themes will assume that button-junk refers to a toolbarbutton and
> design their style rules appropriately...
It also works when I give both buttons inside the deck the same id
"button-junk"... but this isn't exactly what an id is meant to be and I'm not
sure what ill effects this could have (surely one shouldn't use getElementById()
to do something with these buttons). This was the reason why I moved the id to
the deck.
> at the very least this patch slightly breaks classic and modern
What kind of breakage have you seen? I didn't notice anything... but then again
I didn't even notice the problem Adam spotted. ;-( I tested with classic, modern
and retro.
> An alternative that did occur to me would be to highlight the button if the
> message is junk, in much the same way as Composer's Bold button, JS Console's
> All button or DOM Inspector's Select Element button highlights. Thoughts?
This would avoid this bug, but I think such a button would look out-of-place in
the MailNews/TB-Toolbar, because it would be the only button with a depressed look.
When my <deck>-idea is not acceptable and there is no other way to automatically
determine the needed space, what about the first patch in this bug?
Comment 20•21 years ago
|
||
Trying to reproduce the problem I was worried about, I found a tree on which I
could apply the patch (unfortunately my main tree has other toolbarbuttons
patched, in case anyone cares about changing them to menubuttons (spots airborne
pig)) and discovered a rather serious regression, which may be a bug in the deck
code; if you mouse down the junk button, you can't change your mind :-(
Assignee | ||
Comment 21•21 years ago
|
||
(In reply to comment #20)
> if you mouse down the junk button, you can't change your mind :-(
I just filed bug 238492 about this issue.
Assignee | ||
Comment 22•21 years ago
|
||
Neil, with bug 238492 fixed now, do you still think this is the wrong way to fix
this bug? Patch V2.1 still applies with a few lines offset.
Comment 23•21 years ago
|
||
Actually it's bug 65917 that makes this possible.
Comment 24•21 years ago
|
||
Comment on attachment 144443 [details] [diff] [review]
Patch V2.1
r=me if you share the oncommand somewhere.
Attachment #144443 -
Flags: review?(neil.parkwaycc.co.uk) → review+
Assignee | ||
Comment 25•21 years ago
|
||
(In reply to comment #24)
> (From update of attachment 144443 [details] [diff] [review])
> r=me if you share the oncommand somewhere.
I moved the oncommand handler up to the <deck> element before checkin.
Marking FIXED.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 26•21 years ago
|
||
Comment on attachment 144443 [details] [diff] [review]
Patch V2.1
Why did you fiddle with the ids on the patch you checked in?
Assignee | ||
Comment 27•21 years ago
|
||
(In reply to comment #26)
> (From update of attachment 144443 [details] [diff] [review])
> Why did you fiddle with the ids on the patch you checked in?
I don't know how that happened. :-( Sorry! I just corrected my mistake with a
follow-up checkin:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=SeaMonkeyAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=07%2F28%2F2004+23%3A50%3A00&maxdate=07%2F28%2F2004+23%3A55%3A00&cvsroot=%2Fcvsroot
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•