Problem/Motivation
The comment module has CSS that doesn't follow the guidelines set forth by the CSS Cleanup effort (http://drupal.org/node/1089868).
Proposed resolution
Generalize CSS selectors and remove styling where it should be left to the theme to style.
Remaining tasks
None
User interface changes
None. CSS in the Core module is simplified, but does not affect the look of the interface.
API changes
None
Original report by johnvsc
// This is a copy/paste from the CSS Cleanup page
Part of the CSS Cleanup: http://drupal.org/node/1089868
Overview of Goals
- Make it easy to remove unwanted design assumptions in the theme layer, while maintaining critical functionality (such as functional JavaScript widgets).
- Prevent uneeded administrative styles from loading on the front end.
- Give modules the ability to include a generic design implementation with their module, without burdening themers.
- Make CSS and related markup more efficient and less intrusive to improve the themer experience.
The CSS Clean-up Process
Use the following guidelines when writing patches for the core issues listed below.
- Put CSS is in the appropriate file: CSS should be moved to separate files, using the following
name spacing conventions based on their purpose:- module.base.css
- Should hold structural and behavior related styling. CSS should be coded against the Stark theme. The absolute bare minimum CSS required for the module to function should go here. If there is no CSS required, this file should be omitted.
- module.theme.css
- Should hold generic design-related styles that could be used with Stark and other themes. It's where all design assumptions like backgrounds, borders, colors, fonts, margins, padding, etc, would go.
- module.admin.css
- Should hold styles that are only applicable to administrative pages.
To see an example of this in practice, look at Drupal's system module.
- Remove Assumptions: Styles that make too many assumptions, introduce superflous margins, padding and add things like font settings are not necessary and don't belong in core module CSS files. In cases where core themes depend on these properties, they should be moved to the CSS stylesheet of the respective theme.
- Reduce Selector Specificity: CSS code that resides in modules should be written in a way that's easily overridable in the theme layer. To improve the Themer Experience and make core CSS more efficient, CSS selectors should be made as general and short as possible. For example:
- Use
.style {}
overdiv.style {}
where possible. - Use
.module .style {}
overdiv.module div.somenestedelement .style
where possible.
- Use
- Don't use IDs in selectors: Use of ID's in core CSS selectors requires more specificity in the theme layer, making it harder and more annoying to deal with. It makes achieveing consistency in complex design implementations much harder than it needs to be. We need to stop making life hard for theme developers.
- Don't be afraid to change markup: There's lots of overlap between using proper and semantic markup and doing CSS right. If you come across a case where CSS is being applied where using a more semantic elements would solve the problem, then change the markup in your patch to make it right. For more information, see the Drupal 8 Markup Gate rules.
- Start with Stark and cross-browser test.
- "Design" markup and CSS for the Stark theme.
- If applicable, adapt the styles to match the core themes afterward.
- Finally, test the changes in all supported browsers and ensure no regressions are introduced.
Comment | File | Size | Author |
---|---|---|---|
#131 | comment-cleanup-1216976-131.patch | 13.41 KB | dcmouyard |
#128 | 1216976-128-comment.patch | 13.41 KB | cosmicdreams |
#126 | 1216976-126-comment.patch | 13.41 KB | cosmicdreams |
#119 | 1216976-119-comment.patch | 13.28 KB | cosmicdreams |
#113 | 1216976-113-comment.patch | 13.09 KB | cosmicdreams |
Comments
Comment #1
JacineTagging!
Comment #2
aspilicious CreditAttribution: aspilicious commentedThat was easy...
WHAT ABOUT RTL CSS FILES???
Do they need to be splitted or are they all considered to be theme.css.
I guess so...
Comment #3
aspilicious CreditAttribution: aspilicious commentedForgot patch
Comment #4
catchDoesn't the css get included from somewhere?
Comment #5
aspilicious CreditAttribution: aspilicious commentedProbably you're right but how does it work if you have the base and theme css file. Do you need to include both of them?
Comment #6
ruplFor the patch in #3 I don't think we'd need both stylesheets. However, the
.indented
class seems to me like the type of style that provides basic functionality, and might belong in comment.base.css. Should indenting replies be considered standard behavior, or is that a theming choice?If it's fine to keep them consolidated, here's a new patch with comment.info correctly pointing at the new stylesheet.
Comment #7
aspilicious CreditAttribution: aspilicious commentedFor your question about intend:
Comment #8
ruplI'm aware of the base/admin/theme stylesheets, which is why I'm discussing the purpose of
.indented
. It's not the property that should determine where each CSS rule lives, but its purpose.So in this case,
.indented
provides margin styles that are likely to be used in all themes with consistency. Comments are indented so consistently that I'd consider it to be a functional component of comment.module, not a themable style. Does that make sense?Comment #9
aspilicious CreditAttribution: aspilicious commentedIt does makes sense but you say:
If you need to put "likely" in your sentence to guarantee its correct it shouldn't be in a base.css file.
Only stuff that is always always always needed should be in base.css. But I agree its arguable, but we need to have this kind of discussion now before we commited this patch :)
For example, some themes will make the intendation 10pixels, others 20pixels.
Comment #10
aspilicious CreditAttribution: aspilicious commentedI'm tempted to mark this rtbc.
Comment #11
aspilicious CreditAttribution: aspilicious commentedNeeds work after all, we need to rename the rtl files to match the new name
Comment #12
ruplRenamed comment-rtl.css to comment.theme-rtl.css
Comment #13
aspilicious CreditAttribution: aspilicious commentedBased on the aggregator approach, this should be a better patch :).
Maybe we should define a default colour for preview and unpublished. (like we have with the messages)
But that is up for discussion.
Comment #14
aspilicious CreditAttribution: aspilicious commentedMy patches are crap
Comment #15
aspilicious CreditAttribution: aspilicious commentedTalked with jacine and sun, hopefully this is more what they are looking for.
I removed the margin because bartik and garland overwrite it :)
Comment #16
aspilicious CreditAttribution: aspilicious commentedComment #17
ruplThe patch in #15 is nearly identical to the one I posted in #12, minus the
#comments
margin.I found an override in Garland but not in Bartik. For consistency I think
#comments
margin should stay.Comment #18
aspilicious CreditAttribution: aspilicious commentedYes you're right, I found a #comments margin in my grep but that was because I'm screwing up these patches. So your patch in #12 is still good.
Srry for all the noise.
Comment #19
tim.plunkettLooks good.
Comment #20
JacineHey guys, what do you think of dropping .comment-published and .comment-unpublished for just .published and .unpublished?
Since we don't have to support IE6, we are able to do .comment.published { ... } if needed. Node.css currently uses .node-unpublished (with the same exact color), so if we were to do the same thing for the node classes, we could just put .unpublished, and .published in system.theme.css.
Also, I'm not positive, but I think there is another "indented" class in core somewhere. If so, there may be justification to move that to system.theme.css, and we can get rid of this file.
Thoughts?
Comment #21
aspilicious CreditAttribution: aspilicious commentedTested the #comments margin again and it doesn't do *anything*. Tested in firefox, chrome and ie7.
indented is *only* used by comments but I moved everything to system.theme.css just to keep things moving.
the .preview class is kinda dangerous as garland uses it for something related to color module.
Comment #23
aspilicious CreditAttribution: aspilicious commented#21: 1216976-comment-proof-of-concept-21.patch queued for re-testing.
Comment #24
ruplAspilicious is correct. It seems that
.indented
is limited just to comment.module:And again, aspilicious is correct about
#comments
margin's effectiveness. Although it is used differently across themes, there is somewhat of a page flow issue causing the margin to be visually ineffective. Two screenshots of issue comments #12 and #15 respectively:Comment #25
JacineThis is what I was thinking about:
It's horrendous as hell, but indeed a separate issue. Just wanted to check if there was any way to reasonably combine both of them, but nevermind that.
As far as the color module and .preview goes, IMO color module should be changed to .color-preview or something. Color module classes (and any administrative classes) are way less important than common front-end facing classes, and leaving .comment-unpublished and .node-unpublished would be very IE6 of us, but I'll defer that decision to you guys.
Comment #26
JacineI went to test this patch today, and it no longer applied. In the process of recreating it, I started having second thoughts about the changes I proposed. The inconsistency of class names it introduces was really bugging me (especially in the documentation of the template), so I ended up going back to a previous patch by @aspilicious. Sorry, I didn't mean to throw this off.
Anyway, I have rerolled a previous patch with one change. I renamed
.indented
to.comment-indented
and updated the instances of it in Bartik and tests.Comment #27
chichiMi5 CreditAttribution: chichiMi5 commentedsub
Comment #28
droplet CreditAttribution: droplet commentedI think the old class named better (.comment .indented)
.indented / .published ..etc (we able to style it globally when we do custom websites)
Comment #29
JacineThe problem with .indented is that it's not clear what it's for. I mean, we have to grep through the code to see where it's being used, which kinda sucks. It's very general, and inconsistent because everything else is name-spaced with .comment.
On the .published/unpublished/preview classes, I took the lack of response here to mean that you guys didn't support it, and like I said it looked odd in the template documentation (though this could be solved). If you do though, feel free to set this to needs work and re-roll the patch with those changes. Thanks! :D
Comment #30
droplet CreditAttribution: droplet commentedHow about .children ? Actually the comments are parent & children relatives, better than .comment-indented IMO. Therefore we could style all .children globally.
Comment #31
DyanneNovaAssigning myself to work on this.
Comment #32
jyve CreditAttribution: jyve commented@jacine, it sounds like a really good idea to generalise the classes and move them to system.theme.css. The HTML/css used for the indentation is just plain awfull. Let's take this opportunity to replace it with someting that is semantically more correct!
Eagerly awaiting the new patch :)
Comment #33
jyve CreditAttribution: jyve commentedNote: a patch was created in #1217012: Clean up the CSS for the Node module to add .published as a general class in system.theme.css. That updated could be used here to change .comment-unpublished to .unpublished.
Comment #34
jyve CreditAttribution: jyve commentedNote: the indented massacre will be taken care of in another issue: #1316648: Threaded comments should be nested, so we should not worry about it here.
Comment #35
DyanneNovaI also agree that it'd be a good idea to generalize .unpublished and .preview. I'm posting a patch to do that and remove the margin on #comments. I left in .indented for now since it looks like more discussion is going on in #1272870: No semantics for nested comments / bad for screen-readers about the best way to handle this.
Comment #36
ericduran CreditAttribution: ericduran commentedThe last patch seems to have gotten rid of the test.
Comment #37
DyanneNovaWhich test? I didn't include the test change from #26 because I left .indented as is.
Comment #38
jyve CreditAttribution: jyve commentedPatch tested and the only thing that should be changed is replacing comment-unpublished and comment-preview in comment.tpl.php in Bartik.
For the rest: perfect patch!
Comment #39
DyanneNovaThanks! I completely missed Bartik's comment.tpl.php. Here's a patch with that fix.
Comment #40
nattyseydi CreditAttribution: nattyseydi commentedPatch tested it sounds everything is fine
Comment #41
jyve CreditAttribution: jyve commentedPatch tested and looks perfect to me now.
Comment #42
JacineCan we call this "Publishing status?"
This is not your fault. I see it was wrong in the previous comment, but the period should be before the end quote.
This is actually called "killing kittens" cuz it's got nothing to do with the changes we're making in this patch. This should actually be done in the comment.tpl.php cleanup issue.
Can we call this "Publishing states?"
Other than that, this patch look good... Screenshots showing before and afters coming shortly.
Comment #43
JacineAnd here are the screenshots... which show that everything looks identical.
Comment #44
DyanneNovaHere's a patch with those updates. Sorry about the kitten killing. I'll pop my head into the comment.tpl.php issue.
Comment #45
sunPlease ignore that remark for know; requires a larger discussion. The current comment is fine in terms of technical documentation. (The value is "unpublished", not "unpublished.")
Comment #46
DyanneNovaOk, here's a patch with the old text.
Comment #47
JacineIt looks like I was wrong.... and that it's done this way throughout core, which annoys me, but I assume it's a different convention for technical documentation. And that is a battle I am completely uninterested in fighting about. ;)
Sorry for making you do this patch again @DyanneNova. Thanks for re-rolling so quickly! This looks good to me. Will just wait for the bot to mark RTBC. :)
Comment #48
sunWe're missing 1) a @file CSSDoc block header, and possibly 2) a regular CSSDoc block group header for the actual style here. system.theme.css and friends contain examples for these.
-1 days to next Drupal core point release.
Comment #49
jyve CreditAttribution: jyve commented@sun: i've only seen the @file and block group headers in the system module so far. Are they required for small css files too?
Comment #50
Jacine@jyve I don't think they're needed either, but @sun feels strongly about it, so yeah we're gonna have to add these to the other patches as well, and just discuss it in a separate issue later. :(
Comment #51
DyanneNovaHere's a patch with the @file CSSDoc block header, and a block group header to explain .indented.
Comment #52
jyve CreditAttribution: jyve commentedI don't mean to start a new discussion on the @file headers, but maybe we could follow a certain pattern for them? At firs I also copied the @file header from the system module, but then realized they use the wording 'common markup' since there is also a menu.css file for example.
I now came up with this for the other patches:
module.theme.css: Styling for the module module.
module.theme-rtl.css: RTL styling for the module module.
module.base.css: Generic base styles for module module.
module.base-rtl.css: Generic RTL base styles for module module.
module.admin.css: Admin styling for the module module.
module.admin-rtl.css: RTL admin styling for the module module.
Maybe we should open another discussion on this? Or do we want to focus on the cleanup first and not worry about the file headers too much?
Comment #54
DyanneNova@jyve That makes sense to me. I guess we should start a discussion on conventions somewhere.
I'm posting a patch that should actually pass testing this time.
Comment #55
aspilicious CreditAttribution: aspilicious commentedtriling whitespace
another one
29 days to next Drupal core point release.
Comment #56
DyanneNovaFixed the trailing whitespace. Sorry about that.
Comment #57
jyve CreditAttribution: jyve commentedPatch reviewed ans looks perfect now.
Comment #58
droplet CreditAttribution: droplet commentedor edited comment ?
19 days to next Drupal core point release.
Comment #59
jyve CreditAttribution: jyve commented@droplet: according to the comment in #42 we should not update these kind of things in this issue.
Comment #60
jyve CreditAttribution: jyve commentedAnyone care to review the patch in #56? It would be nice to get this in together with the node patch in #1217012: Clean up the CSS for the Node module
Comment #61
droplet CreditAttribution: droplet commentedNode module does not have "published" status ? and comment module does.
maybe a separated issue, why anonymous user do not have styles ?
15 days to next Drupal core point release.
Comment #62
mortendk CreditAttribution: mortendk commented@ jyve
I have looked at it and added a bunch of small thingies like article & footer tags
changed the $picture to$user_picture etc.
removed the ever annoing title class on the h2 :/
and killed the clearfixes surronding the comments - no need for them as the markup & css behaves.
@droplet
is spot on avout the missing publish state of a comment (which is only missing if its posted by anonymous)
so i have added that state to a comment made by anonymous users.
Comment #63
mortendk CreditAttribution: mortendk commentedokay looks like theres also anothe issue about this comment thingie #1189816: Convert comment.tpl.php to HTML5 gather forces ?
Comment #65
JacineHTML5 markup should absolutely NOT be happening here. Throwing markup changes just for the sake of is in these patches doesn't help. I'm tempted to postpone this issue until the other one is completed, TBH.
Comment #66
mortendk CreditAttribution: mortendk commentedthat would make sense - why arent they in one issue ?
Comment #67
Jacine@mortendk because one is about CSS and one is about converted comment.tpl.php to HTML5. Those are separate issues and this is how ALL of our issues are split. See the roadmap. I see no reason why this patch can't go on without touching the comment template, but since it keeps becoming a problem, I'll postpone this for now until #1189816: Convert comment.tpl.php to HTML5 is completed.
Comment #68
jyve CreditAttribution: jyve commented@Jacine, I think you forgot a 'not' in your comment in #65? Just to make sure we understood correctly :)
Comment #69
Jacine@jyve Whoops! Thanks for the save. I've edited the comment. :D
Comment #70
jyve CreditAttribution: jyve commented@mortendk: care to reroll your latest patch now that #1189816: Convert comment.tpl.php to HTML5 has been done?
Comment #71
cosmicdreams CreditAttribution: cosmicdreams commentedIn this reroll how much of the markup should we allow to patch to modify? None of it? I've read through this issue, but I think I might have to read through the linked issued to find out. I'll starting reading but if anyone figures this out before I do please let me know or better yet do the reroll.
Comment #72
cosmicdreams CreditAttribution: cosmicdreams commentedI might be a bit naive with this patch, but here it goes:
This is the patch from #62, rerolled for HEAD, without the changes that would have effected *.tpl.php files.
Comment #73
cosmicdreams CreditAttribution: cosmicdreams commentedGo testbot go
Comment #74
cosmicdreams CreditAttribution: cosmicdreams commentedAs per jacine's comment in irc: The only thing this patch needs is to use the generalized classes set in the node cleanpu patch : #1217012: Clean up the CSS for the Node module
Comment #75
Jacine@cosmicdreams, actually the patch you posted in #72 is missing a bunch of stuff.
Here's what needs to happen. #62 needs to be rerolled with the following changes:
There should be a colon after $user_picture.
This should use the
<mark>
element, and it should also have a colon after the variable name.This part is being committed in the node patch #1217012-55: Clean up the CSS for the Node module, so there should be no changes to system.theme.css here.
Comment #76
JacineSorry, disregard my last comment. I need to be clearer about the changes and some of the markup stuff doesn't belong here. I will post an updated patch.
Comment #77
JacineThis should do it. Hopefully.
Note: I've removed the prefixes for the other classes that are added via preprocess as well so it's consistent.
Comment #78
JacineJust a reminder... This code will be committed via the #1217012: Clean up the CSS for the Node module which is RTBC.
Comment #79
sunThanks all!
Comment #81
cosmicdreams CreditAttribution: cosmicdreams commentedLooks like we have a whole bunch of tests to update.
Comment #82
JacineWhoops. Forgot about tests!
Comment #83
cosmicdreams CreditAttribution: cosmicdreams commentedHere's an updated patch with the classes test fixes.
Comment #84
cosmicdreams CreditAttribution: cosmicdreams commentedComment #86
cosmicdreams CreditAttribution: cosmicdreams commentedWell it has fewer fail. It seems to be failing on the first test for "new" comments: tests for the existence of the "new" class on new comments. Hm....
Comment #87
cosmicdreams CreditAttribution: cosmicdreams commentedIn this patch I:
Comment #88
cosmicdreams CreditAttribution: cosmicdreams commentedComment #90
JacineWhat's wrong with the original logic?
$variables['new']
is created a little further up in the function.Comment #91
cosmicdreams CreditAttribution: cosmicdreams commentedI saw that, and it looked good to me but the condition was a bit implicit. With the change I made I'm using the same logical condition that was used in the previous assignment of the $variables['new'].
Doesn't appear to matter much. Both implementations make the test fail. I'm not sure how to fix it.
Comment #92
JacineWe need:
comment-unpublished
needs to be changed to refer to justunpublished
.Comment #93
sunYou are changing the value of $variables['status'] but you did not update the string comparison condition.
Comment #94
cosmicdreams CreditAttribution: cosmicdreams commentedAh very good, I do a more thorough job of finding these old references today.
Comment #95
cosmicdreams CreditAttribution: cosmicdreams commentedThis patch does the following:
Comment #96
cosmicdreams CreditAttribution: cosmicdreams commentedComment #97
sun#95 looks RTBC to me if bot comes back green. Let's assume it will. ;)
Comment #98
JacineStill awaiting test results... Going to add this to the current sprint to track it.
Comment #99
cosmicdreams CreditAttribution: cosmicdreams commentedhaha, my local box Wins! I ran the test suite on my local box for comment and it finished already.
It failed. Same test fail with the new class. and another test failed with user picture. I'm not sure why these tests failed.
Comment #101
cosmicdreams CreditAttribution: cosmicdreams commentedanybody know how to output a debug message within that test? I want to know more about what's going on in that test that fails.
Comment #102
cosmicdreams CreditAttribution: cosmicdreams commentedAfter adding a few verbose messages into the test I was able to see that when the test does this:
The count($comments) actually equals 2 instead of 1.
I added this statement:
and here's what was returned:
so it seems like we have an array returned the first part of which is empty the second part has "new".
Do we need to correct the test or the code?
Comment #103
cosmicdreams CreditAttribution: cosmicdreams commentedSo, it's meeting the crux of that test: It has > 0 new classes when the comment is new and 0 new classes when the comment is not new. It's just not doing the xpath and count() right.
Comment #104
cosmicdreams CreditAttribution: cosmicdreams commentedAh I get it. The xpath is picking up both the class="new" and the "new" in the body of the span. Here's the markup that is produced in order to illustrate what I mean:
Shouldn't the xpath be smarter than that? I mean, we are telling it to look only at class attributes. Is my assumption correct here?
Comment #105
cosmicdreams CreditAttribution: cosmicdreams commentedNo that's not it! Here's the full markup:
That begs the following questions:
<a id="new"></a>
because it doesn't seem to do anything?Comment #106
JacineI don't understand the first question, but why would we change any of the markup here? The test is the problem. We need help figuring that out. That's all we need.
I wish I could just do this myself, but I already tried, and don't know what is wrong with it. I could have sworn I tagged this asking for PHP help before, but the tag isn't there. Trying to add it again.
Comment #107
cosmicdreams CreditAttribution: cosmicdreams commentedThis patch fixes the errors by modifying the patch (seemed the most sensible of the choices)
Comment #108
JacineThis allows you to link to the latest comment, so no, we cannot remove it.
Comment #109
cosmicdreams CreditAttribution: cosmicdreams commentedComment #110
cosmicdreams CreditAttribution: cosmicdreams commentedwoops. didn't mean to step on your tagging
Comment #111
JacineThis doesn't tell me anything about what you did from one patch to the next. Please be specific about what changes you are making when you change the approach in a patch, otherwise it's really, really hard to review. Thanks :)
Comment #112
cosmicdreams CreditAttribution: cosmicdreams commentedLooks like this will fix all but one test. Which is the user-picture test that #95 failed on. That one seemed to be filtering by xpath on @class="comment-preview". That looks like it needs to be modified to filter on @class="preview" instead. Testing this on my local test suite...
yep that did it.
new patch pending.
Comment #113
cosmicdreams CreditAttribution: cosmicdreams commentedThis patch fixes the 19 failed tests from #95.
Comment #114
cosmicdreams CreditAttribution: cosmicdreams commentedwow, did it again, adding your tag back
So here's a run down on what I did in order to get the tests to pass:
from line 565 to 579
I changed the assertTrue from $count(comments) == 1 to $count(comments) == 2
on line 1007 - 1008
I changed the class from "comment-preview" to preview
Comment #115
sunIn general:
If you did not change functional business logic in Drupal, and you also did not change the fundamental logic and workflow of a test case/method, then a change to a count() assertion like this can inherently only be not correct.
We haven't changed how Comment module renders comments, or how many of them, or what comments an authenticated user is able to see. We also didn't massively change the test code. In turn, logically, there cannot suddenly be two (new) comments on the page where only one has been before.
It rather looks like the XPath of
//*[contains(@class, "new")]
has a false-positive match; i.e., there's another, totally irrelevant DOM element on the page that happens to have the "new" class. To debug this, I'd suggest to run the test locally with verbose output, go to the dumped verbose output page that fails, open your browser DOM inspector of choice, and executejQuery('.new');
there (the equivalent of the XPath expression). (Some browsers also support document.evaluate() to select elements by XPath, but it's not exactly trivial to use.)Now that I see you already dumped the verbose markup into #105, but didn't state what the actual false-positive match is, let me clarify that for everyone:
It's not the anchor with ID #new. The wrapping DIV container has a .new class, and there's also a SPAN.new element within that container.
The former is what we've changed here. The latter (SPAN) already existed, and is used to actually output the "new" string/marker for users.
A possible solution to this is to change all the XPaths in the test to
(Note: The test intentionally uses the * tag/element selector, because Comment module's comment.tpl.php uses ARTICLE already, whereas Bartik's uses DIV. The test shouldn't have to care for the actual HTML element being used, and we want to switch this test to no longer depend on Bartik at some point.)
Comment #116
JacineTHANK YOU @sun! ;) I will try this later.
Comment #117
cosmicdreams CreditAttribution: cosmicdreams commentedCool, when I try to use the new syntax for doing the xpath I get a bunch of "invalid syntax" warnings that seem to break the test.
I'll wait for jacine to do this the right way to see what I'm doing wrong.
Comment #118
cosmicdreams CreditAttribution: cosmicdreams commentedThe fact that the expression in #115 didn't work led me to scour the internet for reasons why. I eventually came across this article: http://stackoverflow.com/questions/1064968/how-to-use-xpath-contains-here
In in the solution and it's comments illustrate that in order to combine the two "contains" tests we need this kind of syntax:
I thought it was worth trying so I'm running the test suite locally for this singular test. If it works I'll change the others to use this new expression.
Comment #119
cosmicdreams CreditAttribution: cosmicdreams commentedOK, I think I was wrong about the proper syntax to use and I ended up using sun's version instead of mine. After re-trying that syntax it seems to have most success. I'm testing an isolated solution in my local test suite. Since that takes about 16 minutes to run I had plenty of time to whip this patch up.
This patch:
Comment #120
cosmicdreams CreditAttribution: cosmicdreams commentedlocal run of this test came back green. So I'll set this to needs review so the rest of the tests (on the siblings) can be tested.
Comment #121
jyve CreditAttribution: jyve commentedTested this patch, and looks perfect.
The new classes get applied correctly in all the different scenario's.
Great job!
Comment #122
sunExcellent. Thanks!
Comment #123
cosmicdreams CreditAttribution: cosmicdreams commentedtagging for jhodgdon
Comment #124
jhodgdonThere are a couple of small documentation issues in this patch, in comment.tpl.php (both the comment module one and the Bartik one):
a)
Drupal docs standards use , before or in lists like this.
b)
This wasn't part of the patch, but it should not be "i.e." here. It should read:
c)
since last the -> since the last
Comment #125
cosmicdreams CreditAttribution: cosmicdreams commented@jhodgdon, I don't understand you're part a) statement, am I missing a comma?
Comment #126
cosmicdreams CreditAttribution: cosmicdreams commentedI'm going to guess that all part a) needs is another comma.
Here's a patch to fix it.
Comment #127
cosmicdreams CreditAttribution: cosmicdreams commentedComment #128
cosmicdreams CreditAttribution: cosmicdreams commentedFound a typo in comment.tpl.php (the one in core/modules/comment) where I had ";ast" instead of "last"
Fixed with this patch:
Comment #129
jhodgdonSorry, #124 (a) meant that:
needs to be
unpublished, published, or preview.
Yes, just needs a comma. Still does. :)
And from #124 (b), there needs to be a semicolon before "e.g.". That is still not right.
Comment #130
cosmicdreams CreditAttribution: cosmicdreams commented@jhodgdon: Are you talking about the patch in #128? I'm not seeing any of the omissions you call out in #129 in the patch from #128. Can you please verify?
Comment #131
dcmouyard CreditAttribution: dcmouyard commented@cosmisdreams The documentation errors needed to be fixed in both comment and Bartick templates.
Comment #133
cosmicdreams CreditAttribution: cosmicdreams commentedthanks @dcmouyard, I see what I missed now.
Comment #134
aspilicious CreditAttribution: aspilicious commentedComment #135
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks.
Comment #135.0
Dries CreditAttribution: Dries commentedAdd clean up docs.
Comment #136.0
(not verified) CreditAttribution: commentedAdded issue summary