#9981 closed defect (fixed)
Strike for ticket comment links
Reported by: | Thijs Triemstra | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0 |
Component: | rendering | Version: | 0.12-stable |
Severity: | minor | Keywords: | bitesized |
Cc: | ryano@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
A link to a comment in a ticket (comment:16:ticket:5120) does not strike the link when the ticket is closed.
For example:
Attachments (2)
Change History (17)
comment:1 by , 14 years ago
Keywords: | bitesized added |
---|---|
Milestone: | → next-minor-0.12.x |
comment:2 by , 14 years ago
-
ticket/api.py
493 493 href = "%s#comment:%s" % (formatter.href.ticket(resource.id), cnum) 494 494 title = _("Comment %(cnum)s for Ticket #%(id)s", cnum=cnum, 495 495 id=resource.id) 496 if 'TICKET_VIEW' in formatter.perm(resource): 497 for status in self.env.db_query( 498 "SELECT status FROM ticket WHERE id=%s", 499 (str(resource.id),)): 500 return tag.a(label, href=href, title=title, _class=status) 496 501 return tag.a(label, href=href, title=title) 497 502 else: 498 503 return label
This patch only strikes the link if you actually have the permission to see the ticket state — otherwise you could gain information you should not be allowed to know.
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed to trunk in [10643]. Thanks to Radomir Dopieralski for the initial patch.
comment:4 by , 14 years ago
Milestone: | next-minor-0.12.x → 0.13 |
---|---|
Owner: | set to |
by , 13 years ago
Attachment: | UsernamesHaveStrikethrough.png added |
---|
follow-up: 7 comment:5 by , 13 years ago
While it seems correct to have comment:1:ticket:9981 display with strike-through, I'm not sure it makes sense for comment:1 to display with strike-through.
One effect of this that I noticed while commenting on #8295 is that the usernames shown at the top of quoted text when generating replyto comments are displayed in strike-through text, when the ticket is closed.
comment:6 by , 13 years ago
Cc: | added |
---|
follow-up: 12 comment:7 by , 13 years ago
Replying to Ryan J Ollos <ryano@…>:
While is seems correct to have comment:1:ticket:9981 display with strike-through, I'm not sure it makes sense for comment:1 to display with strike-through.
That makes sense, and is pretty easy to fix. Would you mind posting a patch?
comment:8 by , 13 years ago
I think there's a problem with the strike-through style used for closed on text links in general, not only here for ticket comments, but also for closed milestones. Using strike-through is pretty much a convention for ticket numbers, but even those are sometimes hard to read when striked through: #8808…
I remember having experimented different alternatives at that time I introduced closed support for milestone (r5436), and I'm still somewhat unsatisfied with the current status. One alternative would be to use a border: #8808, milestone:0.12 (the border "encloses" the link…).
We could also add a background: #8808, milestone:0.12.
Or have only the background: #8808, milestone:0.12. This is a kind of strike-through but with a highlighter pen ;-)
follow-up: 10 comment:9 by , 13 years ago
I agree that strike-through is difficult to read, and should be removed (pretty much everywhere in Trac). The drawback of the background-only solution is that it won't be visible when printing. The same would apply if we showed an icon next to the link. The border would highlight the link compared to others, when in principle we would rather un-highlight it (assuming closed tickets are less important that open ones).
Difficult problem indeed ;)
comment:11 by , 13 years ago
Please not. Even if strike-through may be hard to read sometimes, the presented alternatives are much harder to understand. So when you change that, please at least allow each Trac maintainer to simply use the old method. Usually the fact, that a ticket is closed is much more important, than its number.
follow-up: 13 comment:12 by , 13 years ago
Replying to rblank:
That makes sense, and is pretty easy to fix. Would you mind posting a patch?
Yes, I can take a crack at it by this weekend. The discussion about changing the text style for closed tickets is interesting, but am I correct to think that either way, references to comments within tickets should not provide any ticket status indication, and therefore the patch is needed and will be the same regardless of any changes to text styling for closed tickets?
I sort of like the red highlight background for closed ticket, but I'm not sure it is obvious enough. Then again, I might just be so used to the strike-through that nothing else will seem quite as intuitive.
follow-up: 15 comment:13 by , 13 years ago
Replying to Ryan J Ollos <ryano@…>:
am I correct to think that either way, references to comments within tickets should not provide any ticket status indication, and therefore the patch is needed and will be the same regardless of any changes to text styling for closed tickets?
I think so, yes. Unless others have strong opinions against it.
comment:15 by , 12 years ago
Replying to rblank:
I think so, yes. Unless others have strong opinions against it.
I've encountered a number of issues while trying to implement this ticket, so I've created a new dedicated ticket for the work: #10742. I think the change is still relevant even in the context of the changes proposed in #10012.
That's pretty easy to fix.