Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
comment.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Aug 2008 at 20:40 UTC
Updated:
1 Jun 2010 at 21:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dandaman commentedI was going to look at this but after playing around with comments I'm a little confused as to what functionality this issue refers to. What were you meaning by "collapsed/expanded comments"?
Comment #2
aaronbaumanComment #3
aaronbaumanFixes:
Tests:
Comment #5
aaronbaumanComment #6
dandaman commentedI tested this manually because I was looking into some bugs with the "Collapsed" mode where it was not ever displaying the body of the comments when in "Collapsed" mode. (I also just noticed that the "Add new comment" or whatever link isn't showing up in "Collapsed" mode, or maybe it isn't showing at all.) I posted a patch in #394548: Collapsed comments do not work that tests for the "Collapsed" mode working correctly as well as patching the comments.module to actually display comment body when in "Collapsed" mode. My testing is definitely not as rigorous as yours, but it doesn't seem to be testing the fact that the comments work in "Collapsed" mode, at least from my testing.
Comment #7
aaronbaumandandaman: the point of collapsed mode, afaik, is to hide the body of comments until you click through the subject to read the whole thing.
Comment #8
brianV commentedJust a few suggestions to meet the Coding Style guidelines, and one for comment readability. Beyond the little petty issues below, the code itself looks great, and seems to do what it's supposed to when I test it.
Good work!
variable_set($name.'_article', $value);- should be a space on both sides of the dot when concatenating.+ //$this->drupalGet('node/' . $this->node->nid);- I thought commented out code wasn't supposed to be in core... if you don't need it, take it out for readability.could be rewritten as
Comment #9
aaronbaumanbrianV: thanks for the input.
here's a new version... haven't retested, but should be good to go
Comment #10
brianV commentedLooks good. RTBC as far as I can see.
I will leave it for another person to get eyes on it to confirm.
Comment #12
aaronbaumanof course... another attempt.
Comment #13
brianV commentedSetting to 'needs review' so the testing bot will try again.
Comment #14
dandaman commentedaaronbauman, I'm aware of that. What I found, though, in manual testing was that if I had the comments set to "Collapsed" and clicked on the title of the comment, it went to a new URL, but it looked just the same, with all the comments collapsed. In other words, after clicking on the comment, it did not display the comment. In issue #394548: Collapsed comments do not work I made an attempt at patching and testing that bug.
Comment #15
aaronbaumandan: oh i see.
that is clear now.
yeah, i can reproduce that issue on my install as well.
this patch so far only tests that the comment is collapsed,
not that the comment gets uncollapsed on click...
I think that should be included in this test, but that means the test will fail until #394548: Collapsed comments do not work is addressed.
so i'm marking this postponed until that patch gets rolled.
Comment #16
catchIt might be worth rolling the tests and the patch together - likely to get committed faster.
Comment #17
dandaman commentedcatch: my patch #394548: Collapsed comments do not work does have both a patch and a test to verify the fix. I don't see this patch necessarily needing the bugfix of my patch in order to be useful, as aaron's patch does almost every other rigorous test of the commenting system, and mine covers this small edge case of collapsed comments. I was just tracking this issue because I originally was trying to figure out what to write for this test during the Code Sprint of DrupalCon DC and then stumbled on the bug in my issue. To make aaron's tests more complete, I guess it would be helpful to have it all in one patch.
Comment #18
aaronbaumanok, so here's the patch, rolled together with patch #394548: Collapsed comments do not work
i'm not sure if this is the preferred way to go, but here it is...
Comment #19
catchSorry I misunderstood - I thought failing tests here meant it had to be postponed based on the bug fix in the other issue. As it stands we should probably get the other one in first, will go do an extra review on it.
Comment #21
aaronbaumanadding ending newline... does it work now, testbot?
Comment #22
cburschkaWarning: I'm too tired to do more than code-style currently. But my late-night gaze can examine the code practically byte for byte, so that's fine. :)
Firstly, there are a ton of lines that contain trailing white space (either at the end of the code, or in the form of identation on a blank line). You can remove all of these with
s/ *$//gin perl or sed, so I won't mention them individually."if" needs a space before the condition. Also, if you move the OR operator to the end of the preceding line, you get consistency with the earlier line *and* you can align the two comparisons by their == sign.
The description should have a period and the comment block should end in */, not **/.
After that follow a lot of changes that actually *fix* code-style. :)
These two comment blocks should be terminated by */, and there's another blank line with white space between them.
AFAIK, there should be only one blank line in a row. The $reply2 variable name may be okay, but I'm not sure.
Here's another one.
Comment #23
aaronbaumanCleaned up re: notes from Arancaytar as well as some other coding-standards related stuff.
Comment #25
catchMoving this out of the critical bugs queue - see #607038: Meta issue: fix gaps in code coverage.
Comment #26
aaronbauman