Closed (won't fix)
Project:
Dreditor (moved)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2009 at 04:50 UTC
Updated:
10 May 2012 at 16:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
sunsubscribing
Comment #2
sun+1, me too
Comment #3
sun+1,2349852057 !!!
Comment #4
sunsubscribe
Comment #5
sunNot a feature.
Comment #6
sunNot sure whether this can be done easily. $.text() will return plain-text content only, but a comment could easily contain an image containing further annotations along with a simple amendment "+1 for this!", so we'd mistakenly hide important comments.
Comment #7
alexanderpas commentedwe shoudn't hide the messages with images.
i think the easiest way for now, is to make a (configurable) list, of things we don't want to see, and if the message is FULLY made up of items on the list (spaces etc. not counting), and there is NOTHING else (except spaces etc.), we should hide the message. (won't fix #3, but that's an edgy case.)
Comment #8
moshe weitzman commentedDon't sweat the edge cases. A "+1 for FOO" is not an important comment IMO. Hide em all.
Comment #9
naught101 commentedThis would be good. Any message that matches ^[\W]*sub(scrib(e|ing)[\W]*$ and has only the one line should be killed.
Instead of completely hiding the message though, it'd be awesome if they were just collapsed, possibly even with a link to uncollapse them.
Also, "new" messages should not be hidden, even if they are subscription messages, otherwise this may cause some confusion when coming from dashboard.
Oh yeah, subscribe. ;)
Comment #10
Josh The Geek commented+1 subscribe :)
Comment #11
zilverdistel commenteddefinitely subscribing for this awesome new feature!
Try to filter this one ;-)
Comment #12
Bojhan commentedActually I would be very interested in this functionality, every single time I see this I get a tiny bit frustrated. Because to me a "+1" comment equals, a uninformed and lazy response.
Comment #13
clemens.tolboombased on http://build2be.com/content/searching-issue-drupalorg-jquerygrep I cooked the following js
It wraps the subscribe comments into a fieldset. Unfortunately clicking to open is not working as expected.
Checking the length is still a problem as the filtering in #6 tries to solve. Although changing the issue status should not be placed into a fieldset.
And what about the +1.
Comment #14
naught101 commentedHaven't tried this, but based on the "edit issue settings" fieldset, looks like you need more than that:
<fieldset class=" collapsible collapsed"><legend class="collapse-processed"><a href="#">Edit issue settings</a></legend><div style="display: none;" class="fieldset-wrapper">...fieldset contents...Where the div.fieldset-wrapper is the actual thing that gets hidden...
Comment #15
clemens.tolboomHmmm ... what is "Edit issue settings" fieldset?
jQuery('fieldset')does not reveal this :(Comment #16
naught101 commentedEh.. sorry, I have no idea what I was looking at when I wrote that.. I thought it was this issue, but now it's not there. In any case, I just checked, and if you look at any of the collapsible fieldsets in the "create new issue" page, you'll see what I mean (try opening/collapsing them with firebug open).
Comment #17
naught101 commentedclemens: have you got that working in dreditor.js? I'm not sure how to put it in there and make it work - I'm not very good with javascript yet.. if I can get it working to some degree, I can have a play with it...
Comment #18
naught101 commentedok, this works for me. hides all of sun's first 4 comments, and #10
I would also like to hide empty comments, but text.length< 30 doesn't seem to work. It would also be nice to really reduce the size of these a bit, and maybe make the "subscribe" blue a little less saturated, so it doens't break the flow of text so much.
Not sure where this should be, but if it goes in Drupal.behaviours, it breaks, because it runs twice.
Comment #19
naught101 commentedbtw, this works well on #1224666: [meta] Unofficial Drupal 8 Framework initiative:
41 positives (hidden) out of 92 comments.
1 false positive (#72 - tagging)
4 false negatives (2 empty, one "follow", one "go go go!"), all of which would be caught by a text.length < 20 or something.
I say that's close enough
Comment #20
clemens.tolboomThe attached patch solves the issue change attrib problem (false positive from #19)
It does not solve the 'sub' only as #1224666-85: [meta] Unofficial Drupal 8 Framework initiative shows so the regex needs some tuning.
I set the length to 50 as an empty reply is 39 chars already
Comment #21
clemens.tolboomsub
Comment #22
clemens.tolboomThe collapsed fieldset could contain a '+1' but the fieldset reports 'Subscriber'.
Should we split these?
Comment #23
naught101 commentedPut a ? after the (scrib(e|ing)). I had a bar in the group, and that also works.
+1 is basically a subscription, just as annoying to read, leave it in.
Comment #24
clemens.tolboom@naught101 I had trouble with your regex somehow or my coding skills :-p ... thanks for the '?'
The text 'sub' in #21 is hidden due to the length I added in #20 which is now fixed by the '?'.
Please change the issue status to 'needs work' or 'RTBC' if applicable ;)
Comment #25
helmo commentedWorks nice, also tried it on #34496: [meta] Add Flag module to allow users to subscribe/unsubscribe without posting a comment
Comment #26
naught101 commentedThis currently breaks the "new" link functionality, in that if you click "4 new" on the issue queue/post tracker, it sends you to node/#new, and THEN hides the subscriber comments, which moves the page relative to the viewport. The viewport needs to be refocussed on #new after the subscribe comments are hidden.
Comment #27
clemens.tolboomCould you
Is this filter too broad?
Could you check this on the mentioned page please?
[edit] Is the result of
not good enough to check for the issue page?
Comment #28
clemens.tolboomDid you mean we have to filter like this
Comment #29
clemens.tolboomPatch attached.
Comment #30
naught101 commented#28 No, I meant that the viewport is mis-aligned after the comments are hidden (ie. the browser viewport ends up looking at the comment box, or even the footer, because the rest of the page has moved up (shrunk). We need to move the browser viewport to #new again after hiding comments.
But yeah, I think it's probably a good idea not to filter new comments, as that's the main reason most power users are likely to click on an updated issue from their queue/tracker.
Comment #31
helmo commented#28 indeed fails when linking to a comment directly; e.g. http://drupal.org/node/34496#comment-5011670
Would something like this be an option? http://plugins.jquery.com/project/ScrollTo
Comment #32
clemens.tolboomAah ... a phone call helps a lot ... tnx helmo
Comment #33
clemens.tolboomsubscribe
Comment #34
clemens.tolboomI added the scrollTo paradigm
Comment #35
helmo commentedtest subscribe
Comment #36
naught101 commentedthe more systematic fix over at #34496: [meta] Add Flag module to allow users to subscribe/unsubscribe without posting a comment is likely to be fixed this week (probably tuesday/wednesday, depending on your timezone). I don't think this is worth putting in dreditor after that, as subscribe comments will dwindle very quickly, and it's not really worth having the potential false positives just for a few old issues.
Tentatively calling this a won't fix. If anyone disagrees, feel free to re-open.
Comment #37
clemens.tolboomI'm not sure what #34496: [meta] Add Flag module to allow users to subscribe/unsubscribe without posting a comment will do with issue having old 'subscribe' texts. How long will these bother us?
Hiding new comments having 'subscribe' would be a bad idea because we need to educate those users.
So agreed to a won't fix.
Comment #38
naught101 commentedHrm... As sun pointed out in another thread, this is mostly going to be annoying to more experienced queue users, who are working on big bugs that have been around for years, and have tons of comments on them. Those users are the ones most likely to use dreditor, too. Maybe we should still implement this. We can always remove it later, when this becomes a non-issue.
Setting to needs work, because I'm wondering if there's a way of turning the comment div into a fieldset, rather than putting it in a fieldset, thus making the expanded comment take up less space?
Comment #39
clemens.tolboom#1303644: comment validation to prevent '+1 subscribe' comments
I have this patch installed through my sandbox and it works like a charm. I put this to needs review as I don't expand the collapsed fieldset ... it contains subscribe text anyway right :-)
Comment #39.0
clemens.tolboomUpdated issue summary.
Comment #39.1
clemens.tolboomRemoved the direct install. By clemens.tolboom
Comment #40
helmo commentedThe scrollTo is applied using "$('a#new').each" which would run if a new comment is present.
Besides '#new' the request url could also have e.g. #comment-5160156 in which case that comment would have to be scrolled to after collapsing the subscribe comments.
And when the request url contains no #something part and there is a new comment then the focus should remain on the top of the page
I think the key might be to use
$(document.location.hash).each()and test if document.location.hash has a value.But still: When I e.g. go to http://drupal.org/node/34496#comment-1335726 it first positions on #87 on the top of my window, and a moment later #87 drops 10cm lower.
Comment #41
clemens.tolboom@helmo: Nice catch and improvement.
I fixed my issue branch and attached the new patch.
Comment #42
clemens.tolboomI was trying to tell the 10cm drop has nothing to do with this patch ... but with the original it scrolls a tiny bit. So it has to do with the scrollTop()
Checking with
1. Install original dreditor http://drupalcode.org/project/dreditor.git/blob_plain/HEAD:/dreditor.use...
2. Navigate to http://drupal.org/node/34496#comment-1335726
3. Notice the tiny scrollbar jump
4. Install the issue-branch version http://drupalcode.org/sandbox/clemenstolboom/1125712.git/blob_plain/refs...
5. Navigate to http://drupal.org/node/34496#comment-1335726
I found the solution with using
Drupal.dreditor.goto(document.location.hash);instead of my homebrew solution.Comment #43
helmo commentedLooks good
Comment #44
helmo commentedWell so much for this...
I'm closing this as no-one is willing to merge this.
Comment #45
sunSorry for leaving this alone for too long. :-/
But yeah, meanwhile, drupal.org enabled fasttoggle module, which allows to unpublish useless comments with a single click. So most of the +1/subscribe comments are actually getting unpublished over time, which hides them for all users (not only Dreditor users) and eliminates the need for hiding them via Dreditor.
That said, they're still visible for privileged users, so I've created #1570824: Collapse/hide unpublished comments
Comment #46
moshe weitzman commentedI would think that delete makes more sense than unpublish for these comments. Then they are also hidden for admins and aren't clogging up the DB. The issue queue doesn't allow threading anyway.
Comment #47
sunUnfortunately, the delete operation is not covered by fasttoggle (I guess that's by design), so that makes a huge difference in terms of (human) moderation/cleanup performance. Right now, I can quickly iterate over all comments in an issue and unpublish the useless with a single click on the go.
Additionally, I'd have to check the Follow flag integration code once more to be sure, but I believe a user is unsubscribed from an issue when his comment is deleted (if it's the only one, which is often typically the case for subscribe comments).
Comment #47.0
sunFixed link for real :( by clemens.tolboom