Closed Bug 103592 Opened 23 years ago Closed 23 years ago

truncate or wrap long email addresses in buglist.cgi

Categories

(Bugzilla :: Query/Bug List, defect)

2.15
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: asa, Assigned: kiko)

Details

Attachments

(7 files)

split off from bug 62729

There are several b.m.o users with email addresses in excess of 30 characters. In
cases where the reporter, qa contact or assignee are visible and of such great
length then all the other columns are shifted far to the right causing a
horizontal scroll and making bug number and summary not visible at the same
time. One solution to this problem would be to truncate or wrap email
addresses at some reasonable width. I can't ask these folks to get a new email
address but I wouldn't feel too bad asking them to abbreviate a long realname. 

For a testcase query b.m.o for bugs assigned to 
Roland.Mainz@informatik.med.uni-giessen.de
Sounds simple.
Assignee: endico → kiko
Possibly related:
Bug 61447: [patch] Column width control in bug lists
I've added a parameter emailtruncatelength which is a solution to this bug, and
it's displayed at http://bugs.async.com.br/buglist.cgi

If people aren't happy with the Param() I'll change it, as long as we have
something to control it with. I think if bug 61447 lands all we would need is
the link part of this bug, but it's still much simpler and easier to review. Ah,
well.
Status: NEW → ASSIGNED
Keywords: patch, review
I think we should just truncate at 30 characters and be done with it. We don't
need Yet Another Pref, because I can't think of anyone who would say "Actually,
I want my buglists to be gisburned - change that pref to 50 characters!".

We already truncate resolutions and summaries. Just truncate it at 30. It's a
two line patch. I'll review it.

Gerv
Well, gerv, I don't know. My CS teacher said "avoid magic numbers". I guess this
could change again when column widths kick in for good.

The rest of the (largish) patch is just tab -> space fixed (ugh).
Comment on attachment 52642 [details] [diff] [review]
kiko_v2: fixes using magic number

You seem to have some strange spacing issues here. Could you check that? 

The standard forms are:

} else {

and 

if (foo == bar)

Gerv
Well, the spacing was already broken there when I hacked this in, but okay, I've
fixed it.

I'm a little bit concerned that the added visibility the links provide might not
be too good, but that's up to you.
Keywords: ui
OS: Windows 2000 → All
Hardware: PC → All
Comment on attachment 52660 [details] [diff] [review]
kiko_v4: use SPAN TITLE instead, use maxemailsize variable.

r=gerv.

Gerv
Attachment #52660 - Flags: review+
Why is the param "9" instead of 30?

And why's this commented out:
+<!--<B>" .  time2str("%a %b %e %T %Z %Y", time()) . "</B>-->";

? :-)

Gerv
Comment on attachment 53130 [details] [diff] [review]
kiko_v6: reason: idiocy. I should go back to primary school and learn to do diffs

r=gerv

Gerv.
Attachment #53130 - Flags: review+
Comment on attachment 53130 [details] [diff] [review]
kiko_v6: reason: idiocy. I should go back to primary school and learn to do diffs

r=afranke
Attachment #53130 - Flags: review+
Comment on attachment 53130 [details] [diff] [review]
kiko_v6: reason: idiocy. I should go back to primary school and learn to do diffs

Now they're all checked :)

>Index: buglist.cgi
...
>+                    $value = html_quote($value);

Anything that's gonna be put inside "" like $value is should be run through
value_quote() not html_quote() [html_quote() doesn't escape " marks]
Attachment #53130 - Flags: review-
Comment on attachment 53133 [details] [diff] [review]
kiko_v6_2: use value_quote (jesus)

I'm going to assume that r=afranke and r=gerv still apply.
And for good measure, r=jake :)
Attachment #53133 - Flags: review+
Why do we have two functions? Why not one that does both? Escaping quotes in
HTML isn't harmful... Anyway. r=gerv again. Let's just check this in, OK? :-)

Gerv
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.145; previous revision: 1.144
done
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.16
Jake: What about the html_quote that's in the context of the diff? Is that one
wrong, too?

                 if ($::needquote{$c} || $::needquote{$c} == 5) {
                     $value = html_quote($value);
                 } else {
Oops, sorry, ignore my previous comment. I see what you mean.
Maybe this is a better question: Why don't the following code fragments use
html_quote instead of value_quote?

http://lxr.mozilla.org/mozilla/source/webtools/bugzilla/buglist.cgi#1103

if ($::FORM{'debug'} && $serverpush) {
    print "<P><CODE>" . value_quote($query) . "</CODE><P>\n";
}

http://lxr.mozilla.org/mozilla/source/webtools/bugzilla/buglist.cgi#788
if (defined $::FORM{'debug'}) {
    print "<P><CODE>" . value_quote($query) . "</CODE><P>\n";
}
Andreas: as Gerv said, value_quote escapes " -> &quot; and this isn't bad inside
HTML, so it's no big deal. html_quote would be simpler, but perhaps we might
want to migrate away from html_quote completely, as Gerv suggests.
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: