Closed
Bug 274906
Opened 21 years ago
Closed 20 years ago
Replies garner extra [edit] attachment links
Categories
(Bugzilla :: User Interface, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: neil, Assigned: jacob)
References
()
Details
(Whiteboard: [wanted for 2.20])
Attachments
(2 files)
|
1.35 KB,
patch
|
Details | Diff | Splinter Review | |
|
873 bytes,
patch
|
Wurblzap
:
review+
|
Details | Diff | Splinter Review |
If you reply to a message that references an attachment the [edit] is captured
into the reply, then an extra [edit] is generated when the reply is displayed.
Updated•21 years ago
|
Assignee: justdave → myk
Component: Bugzilla: Other b.m.o Issues → User Interface
Product: mozilla.org → Bugzilla
QA Contact: myk → mattyt-bugzilla
Version: other → 2.19.1
Updated•21 years ago
|
Flags: blocking2.20+
Updated•21 years ago
|
Summary: Replies garner extra [edit] links → Replies garner extra [edit] attachment links
Comment 1•21 years ago
|
||
Comment 2•21 years ago
|
||
(In reply to comment #1)
> Created an attachment (id=168901) [edit]
> Here is an attachment
Here is a reply to the auto-generated message featuring the attachment.
Gerv
Comment 3•21 years ago
|
||
We have two choices. Either:
- Get the reply link to filter out the [edit], either specifically or all
matches of that string, or
- Don't add a second one if we detect that one is already there, but linkify it
instead.
Gerv
Comment 4•21 years ago
|
||
(In reply to comment #3)
> - Get the reply link to filter out the [edit], either specifically or all
> matches of that string, or
So here we hack getText() in the JS script...
> - Don't add a second one if we detect that one is already there, but linkify it
> instead.
And here we modify GetAttachmentLink() in globals.pl.
Which solution is better? What if I write "toto [edit]"? The JS script would
remove it even if [edit] means nothing special here?
Personally, I would prefer to remove it when clicking the "reply" link, that
means to consider this in the JS script.
Or we could even imagine not to linkify bug numbers and/or attachments in
replies, but only in new texts.
Comment 5•21 years ago
|
||
I don't think that this is really blocking2.20+, it's pretty minor. It can be
fixed in 2.20.1 if we have to, if it's not fixed by 2.20...
Updated•20 years ago
|
Target Milestone: --- → Bugzilla 2.20
Comment 6•20 years ago
|
||
The underlying problem is that a function that is only supposed to linkify text
is changing the actual content of the text.
One idea I just had (which perhaps belongs in another bug if it's plausible):
Why not make the [Edit] into a real button, rather than the word "Edit" in
square brackets? ... or would that be unworkable e.g. due to nested forms?
Failing that (or in order to cope with historical data), the problem is created
by the linkification code, so IMHO should be fixed by the linkification code
too...
perhaps something like (globals.pl - by inspection, untested):
- $text =~ s~((?:^Created\ an\ |\b)attachment\s*\(id=(\d+)\))
+ $text =~ s~((?:^Created\ an\ |\b)attachment\s*\(id=(\d+)\)(\ \[Edit\])?)
- $text =~ s~\b(attachment\s*\#?\s*(\d+))
+ $text =~ s~\b(attachment\s*\#?\s*(\d+)(\ \[Edit\])?)
| Assignee | ||
Comment 7•20 years ago
|
||
I like the idea of a button, but it has to either be a nested form (which seems
to be a bad idea) or use a JavaScript onclick event... and because it's
JavaScript, we'd need to have a non-JavaScript alternative and that would
probably put us in the same boat we're in.
Comment 8•20 years ago
|
||
(In reply to comment #7)
> I like the idea of a button, but it has to either be a nested form (which
> seems to be a bad idea) or use a JavaScript onclick event...
Shortly after I submitted my comment here about a button I had (IMHO) a better
idea - see bug 286427.
Updated•20 years ago
|
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
Comment 9•20 years ago
|
||
We should stop appending [edit] to attachment links and start linking the
attachments directly to the edit page by default. From that page, users who
want to see the raw attachment can click a link to take them to it.
Comment 10•20 years ago
|
||
"If it's not a regression from 2.18 and it's not a critical problem with
something that's already landed, let's push it off." - Dave
Flags: blocking2.20+
Updated•20 years ago
|
Whiteboard: [wanted for 2.20]
Updated•20 years ago
|
Flags: blocking2.20-
Comment 11•20 years ago
|
||
Agree 100% with Myk. It may be a bit painful now, but the edit page is the most
useful place to link to (the raw view page doesn't let you go _anywhere_, at
least not without hacking the URL).
| Assignee | ||
Comment 12•20 years ago
|
||
I agree that the easiest way to solve this problem is to change the link to be
to the edit page instead of the attachment itself when in a comment. There is
still a direct link to the attachment in the table above the comments and one
is available from the edit page. Bug 286427 can be about expanding the UI to
provide a popup <div/> with more info links in context.
Comment 13•20 years ago
|
||
Comment on attachment 181872 [details] [diff] [review]
Patch v1
Happiness-flavoured r=wurblzap by inspection.
Attachment #181872 -
Flags: review+
| Assignee | ||
Updated•20 years ago
|
Flags: approval?
Comment 14•20 years ago
|
||
wooot! by all means! :) That extra link always annoyed me :)
Flags: approval? → approval+
| Assignee | ||
Comment 15•20 years ago
|
||
Checking in globals.pl;
/cvsroot/mozilla/webtools/bugzilla/globals.pl,v <-- globals.pl
new revision: 1.321; previous revision: 1.320
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: Bugzilla 2.22 → Bugzilla 2.20
| Assignee | ||
Updated•20 years ago
|
Attachment #181872 -
Flags: review?(myk)
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•