Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
Bartik theme
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
5 Jun 2010 at 19:26 UTC
Updated:
18 Nov 2010 at 07:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Jeff Burnz commentedThis is the $permalink for the comment, not the number of the comment as we might expect - i.e. the number of the comment in one particular thread.
The "hash only" display is coded in core:
This makes sense as the accurate alternative is...
..which doesn't make sense because comments will show their cid, so if its the 588th comment for the whole site, but the first comment for a node it will show #588, which is potentially confusing to site users.
I would suggest we text-image replace this with an icon or override template_preprocess_comment and use the actual word "Permalink".
Comment #2
jensimmons commentedLet's fix this before Bartik goes into core.
Comment #3
Jeff Burnz commentedWhat do you mean fix it? What is the issue here?
Critical?
Comment #4
jensimmons commentedThe issue is that for each comment, there's a # next to them, and no number.
That just seems weird to me. I expect a number, and for the # to be hidden — be there, but not displayed visually. At least that's what I think I expect.
Comment #5
bleen commentedthe # is not intended to indicate a number ... it is intended to indicate a permalink. I agree that its not very good at that, but that is the core output. I think we should
a) open an issue in core to make that output clearer in some way
b) use Jeff Burnz suggestion and come up with an icon of some kind that indicates permalink
In any case, I agree that this is not critical since all we are doing is displaying the core output as-is ... this shouldnt hold anything up
Comment #6
Jeff Burnz commentedHeres a couple of things:
1 - the permalink is already being printed - its the comment title link
2 - neither of the links ($title or $permalink) have anything to indicate they are permalinks, its just assumed
So - thinking we can remove it, looks very much optional?
We could add rel="self bookmark" - the proposed hReview permalink microformat?
Comment #7
jensimmons commentedwebchick also didn't like this:
Comment #8
bleen commentedfor the "comment arrow", see #845904: Problem with comment arrows?
Comment #9
Jeff Burnz commented1. Not sure about that, it might confuse users, since the CID is the comment ID, so it will be something like #581 if this is comment number 581 for the whole site - that said if it was less prominent both in position and color/contrast and has the hover title "Permalink" it could work.
2. Yes, it is odd, I don't like it at all.
3. Links should be flush aligned left or right, they look a bit "floaty in space".
Comment #10
jensimmons commentedas for the links — that's in another issue. #846014: Check/fix alignment of links in Comments Ah, webchick and her screenshots that put multiple issues into one image. Didn't I read something about not bundling issues together on her blog somewhere. :D
As for the point of this issue, what should we do about that weird # floating there. There isn't a quick answer. We could make it light grey, and smaller... but really it's just weird and should be fixed in core somehow.
CSS styling is a Bartik thing. Changing the HTML markup is better done in core.
Ideas?
Comment #11
jensimmons commentedOr, yeah, we could just hide this. It's not a known design pattern to have a "#" to hold the permalink. Maybe really that's the solution — to visually hide the anchor.
Comment #12
dman commented1. There must be a visual element to link to the comment anchor. It's vital to be able to link directly to a point in a thread
2. Titles for individual comments in a thread are optional and cam be turned off by the admin so we can't count on using that for the link.
3. Numbered comments make no sense on threaded discussions
though datetime may work
I've seen the # convention around in heaps of discussion boards and it made lots of sense to me - but that's because I learned some HTML long ago and recognize #anchor as having a meaning on the web.
If you've never seen that in a web page or an URL then I guess it's not 100% intuative - but I've always thought if it as one of the more natural evolved conventions out there.
I've seen a small speech bubble icon used for this purpose also - which is ok - but I still prefer the #anchor like this
- it distinguishes between an outgoing text link and a link "to here"
Any alternative to the current convention would deserve a lot of investigation
Comment #13
tsvenson commentedWhat about moving it to the line where the delete/reply/edit is and rename it to "permalink"?
This could also be optional, especially if comment titles are used since the title will contain the anchor then.
Comment #14
webchickFWIW, in my screenshot I didn't mean #2872871, #2387922, #23872823 (the comment ID). I meant #1, #2, #3... (the comment count). Like the issue queue.
Comment #15
bleen commentedI think that might be the best suggestion so far ... I'll play with this later tonight
Comment #16
bleen commentedEDIT: typo in this patch ... check out #17 instead
Comment #17
bleen commentedThis patch takes webchick's suggestion from #14 ...
screenshot:

Comment #18
jensimmons commentedNice, I like the way that looks. Good UX and good styling. I don't have time to review the patch right now; hopefully soon.
Comment #19
bleen commentedbump
Comment #20
aspilicious commentedWhy do I see the #?
Comment #21
bleen commented@aspilicious ... clear your cache?
I just did a fresh d7 install, applied patch and left a comment:
Comment #22
aspilicious commentedNice! Even works in IE7-IE8!
But...
It doesn't work in rtl...
So back to needs work
Comment #23
bleen commentedthis looks much better in RTL

Comment #24
aspilicious commentedThe # part is rtbc.
But IE8 and IE8 compatibility mode (ie7) has still some issues with the comment box.
Attached a screenshot from the latter.
Comment #25
bleen commentedspoke with aspilicious on IRC ... the missing left borders seem to be caused by this patch. The messed up input formatting area is not. I'll work on this tonight.
Comment #26
naheemsays commentedA question/bikeshed - should this numbering be done in the bartik_process_comment in order to keep it bartik specific or should it be done elsewhere to make it the general case?
Comment #27
bleen commentednbz: theoretically the numbering is actually the way that bartik decided to handle the "permalink" html that core spits out. There are certainly ways of using that markup that has nothing to do with the "count." Thats my argument for leaving it in Bartik, but I could certainly be swayed that the "count" is going to be such a common use case that we can move that into the comment module (or wherever) and let other themes use a theme function ...
My vote is 51/49 in favor of leaving it in Bartik's perprocess functions
Comment #28
webchickDefinitely Bartik. It's too late to make changes to the global HTML that Drupal spits out, unless it's a legitimate bug fix. It screws the people who are trying to upgrade their themes right now in preparation of Drupal 7's release.
Comment #29
bleen commentedSold to the webchick in the first row!
Comment #30
bleen commentedthis patch includes a little something extra for IE7 ... it's amazing how much I love IE7 (for not being IE6) and hate IE7 at the same time.
Comment #31
jensimmons commentedI <3 bleen.
Comment #32
aspilicious commentedDon't love bleen to much there is still a bunch of work to do to improve Bartik on the IE side of life.
you spoke about IE6, then I realised that I had windows xp mode...
And then I saw this needs work :)
Comment #33
aspilicious commentedBut I admit you already did a great job even in IE6. (no errors on this picture just a screenshot to confirm how awsome it is)
Comment #34
eustace commentedBefore and after on PPC OSX 10.5 using FF3.6.7 and Safari 5.0
Comment #35
aspilicious commentedEDITED: Before and after are different but this is not the actual result, you need to clear the cache.
Comment #36
eustace commentedThe '#' permalink is above the name and outside the comment box in the before. It is above the title and inside the comment box in the after. I'm really green but ready to learn so please have patience :)
Comment #37
aspilicious commentedI have patience, I was just saying you need to clear your cache to see the actual result. You do this by going to configure, performance, clear all caches :)
Comment #38
eustace commentedAh! Thank you aspilicious. After clearing caches I now have same results as you. New before and after:
Comment #39
bleen commentedJust a teeny-tiny tweak for IE6(RTL) and I think now we're good to go...

Comment #40
bleen commentedbump
Comment #41
aspilicious commentedWill look at this soon as possible :)
Comment #42
aspilicious commentedNeeds a newline in the ie6 rtl version.
Except for that this looks rtbc. But look at the comment comment box in in IE6 rtl. The "name" and "subject" are on the same line. Related?
Comment #43
bleen commentedThis takes care of both issues in #42
Comment #44
aspilicious commentedLooks great all browsers look how they suppose to look ;).
Comment #45
webchickNeeds sign-off from Jen, but #39 looks good to me!
Comment #46
bleen commentedspoke to webchick in IRC ... she meant #43 looks good to she
Comment #47
dries commentedMmm, does this work with threaded comments? Looking at the code, it looks like a comment's number could change when a comment is inserted in a higher thread. This could easily "break" conversations that reference those numbers like we do in the issues. We'll want to verify that, IMO.
Comment #48
jensimmons commentedThis looks great to me. +1
Go ahead and commit it.
Comment #49
jensimmons commentedYeah, Dries' point in #47 is right. There's a numbering problem with threaded comments.
:(
Comment #50
jensimmons commentedActually, let's debate whether this is a blocker or not. #number is so much better than # by itself.
UX team, what do you think?
Comment #51
bleen commentedI've been talking with jensimmons on IRC about this ... its seems to me we have a few options:
Thoughts?
Comment #52
jensimmons commented#4.
I say, let's number them 1, 2, 3, 4, 5, 6, etc. Not #5-1, #5-2, etc ('cause what about nested comments that go 3 and 4 levels deep — is that #5-1-2-1?) And not with the comment ID ('cause that doesn't really solve any confusion).
Let's instead number them according to the order in which they were added to the discussion. That's how the URL's work now. The first comment is at 1#comment-1; the sixth comment is at 6#comment-6.... let's therefore number them 1 and 6.
The comment numbers will then be out of order on the page — but in chronological order. Which is actually kind of handy. You can see the order in which the discussion happened. I read deeply threaded discussions on groups.drupal.org (that nyc group) and find myself frequently confused because I *can't* tell which comment was added after which other one (or before). I'll hover over the URLs just to tell.
So visually, I'm talking about this:
Comment #53
tsvenson commented#52 +1 from me.
Comment #54
bleen commentedIt's worth noting a comment form chx (in IRC) that if we use a static counter (with any of these solutions) we need to bear in mind things like two nodes (with comments) showing up on teh same page using panels (or whatever)
Comment #55
bleen commentedIf Jen's suggestion (#52) is the way to go (and I'm stil only 82% convinced it is...) I'm not sure how this could be accomplished. If anyone wants to point me in the right direction I'm happy to make a new patch... anyone? anyone?
Comment #56
damien tournoud commentedLet's review the list one more time:
I guess that means as in #43? In that case this is a no-go, because it just doesn't work with threaded comments. Plus if you use a static see comment #54.
That sounds doable.
Those two are either the same or very different depending on how you look at it.
First, to clarify, the comment ID *is* the number from the permalink URL, so worded like that, those two are exactly the same.
(3) can be done easily.
I guess that (4) means: sequentially number the comments in the order they are entered. What happens if a comment gets deleted or unpublished? Do you renumber?
a. If you renumber, how is that a permalink? More importantly, if you want to compute this information, you have to take into account that comments might get paginated, and that comments on page 2 can change the numbering of comments on page 1. You don't have enough information in the theming layer to do that, this is a no-go.
b. If you don't renumber, you have to keep this information somewhere, because it is permanent. We don't store this information, and it's way too late to add it in the code. This is a no-go.
Conclusion: (4) is a no-go.
Hide the # by default and show it only in hover?
Comment #57
bleen commentedClarifying the list from #51 (based on comments in #56):
All this said ... I think the only workable solutions are going to be either 3 (use comment id) or a variation of #5 (maybe with Damian's suggestion of only showing on hover) and displaying a link that says "permanent link" or something and avoid numbering all together.
Comment #58
webchickBased on recent comments, it indeed sounds like the comment numbering scheme method is a no-go. Ugh. Sorry, bleen. :\
One alternative is to make something else the permalink, like the date/time. That seems to be what wordpress and twitter does, so there's precedent for this (where i've never seen a "#" floating in space be a permalink).
Comment #59
michelleI've seen sites where it literally says, "(permalink)". This would make it translatable, too, so people could switch it to a different word if they like.
Michelle
Comment #60
cubix commentedIs it possible to use a combination of both 1 & 3? Keep the comment ID as the permalink target but to increment the comments on the page.
This way the end user will see sequential numbers, making logical sense, and the permalink will remain static. Can this be done at theme level?
Comment #61
damien tournoud commented@cubix: no, that's (1) (or (4)), and it's not possible.
Comment #62
bleen commented@cubix: that would be ill-advised too because people would likely be referencing other comments by number and if those numbers changed than teh reference wouldnt make sense ... for instance, this comment I'm writing is in response to #60 ... what happens if tomorrow #60 changes to to #61 because there is a new "reply" farther up the thead
Comment #63
bleen commentedre #59: Your suggestion is a variation on -5 from the list in #57. My only worry there is the "permalink" is IMO a very geeky word and despite its accuracy is a bad choice for the masses.
In truth, the comment's "title" is already a link to the permalink ... we could simply not output the "#" Thoughts?
Comment #64
Jeff Burnz commentedLiking the sound of #58, indeed Wordpress and Twitter do this exactly. Pretty easy...
Something like that?
Comment #65
bleen commentedConsidering that the comment title already links to the comment permalink, I'm leaning towards simply not displaying the "#" ... but I could certainly be swayed by a good argument for making the date/time link... so, what's the good argument?
Comment #66
webchickThe good argument for not depending on the comment title for the permalink is that comment titles can be disabled. This would break permalink functionality. Like it's broken right now in BlueCheese theme for example. See http://association.drupal.org/node/624.
As far as using date/time or using a string called "permalink", either is fine with me. I defer to the Bartik maintainer. Probably add the permalink URL to the comment.tpl.php as a variable (if it isn't already) so that themers can stick it wherever they want.
Comment #67
bleen commentedThat certainly qualifies as a good reason ...
I think that linking the date/time is just weird. So...

Comment #68
bleen commentedoops .. left a DSM() in that last patch
Comment #69
webchickGreat. But let's go ahead and add this new variable to core (http://api.drupal.org/api/function/template_preprocess_comment/7 + top of comment.tpl.php), rather than just to Bartik. It's an optional API "addition" so doesn't break any freshly ported themes.
Also, could you please post a screenshot so this patch can be visually reviewed?
Comment #70
bleen commentedscreenshot in #67 (forgot to set input format) ...
as for the variable ... it already exists in core comment.module:2219:
$variables['permalink'] = l('#', $uri['path'], $uri['options']);we're just changing it for bartik
Comment #71
webchickOh, I see. Weird. I wonder who thought an untranslatable '#' was a good idea for a label for permalink. :\
Anyway, totally separate issue.
Comment #72
webchickWell, actually, no it's not.
We should fix this at the source. (but also make sure it looks good in Bartik)
Comment #73
bleen commentedThis patch makes the permalink translatable in the comment module and makes it look pretty in Bartik:

Comment #74
Jeff Burnz commentedNormally single words would start with a capital letter, not all lowercase. Use CSS to style (text-transform).
Perhaps we should be using rel='bookmark' on these permalinks?
Powered by Dreditor.
Comment #75
bleen commentedboth excellent points ...
Comment #77
bleen commentedhmmm ... one more try
Comment #78
reglogge commentedTested in Safari, Firefox (Mac) and IE6, IE7 on Windows. Works well.
Comment #79
dries commentedCommitted to CVS HEAD. Thanks.
Comment #80
Jeff Burnz commentedThis just created a problem with the H3 title in comments which has the class of .permalink - so now comment titles are too small and lowercase. Also this is a naked anchor, this should be wrapped in some markup like a p element like the rest of the attribution elements.
The class to target the new permanlink should have been #comments .attribution .permalink {}
Comment #81
reglogge commentedpatch attached
Comment #82
Jeff Burnz commentedYou can't set the font size on the anchor anymore, you need a class such as class="comment-permalink" on the p wrapper and set the font size on that, i.e. the same as #comments .submitted .comment-time
Comment #83
reglogge commentedIs this better?
On another note: We don't use the class .permalink that is attached to both the comment header and the actual permalink anywhere for styling. Do we need it at all?
Comment #84
Jeff Burnz commentedThat'll do it, lets get this baby in so we can re-roll the other patches for Bartik.
Comment #85
webchickCommitted to HEAD. Thanks!
Comment #86
Jeff Burnz commentedPhew, good work team, thanks!
Comment #88
johnalbinReally odd that this variable didn't make it into Garland. :-\ #975254: Garland completely ignores permalink variable for comments