Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
node.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Jul 2011 at 22:33 UTC
Updated:
29 Jul 2014 at 19:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jvc26 commentedDecided to give this a go, as far as I could tell, the css for node simply needed moving into the node.theme.css file, and corrections of the paths in node.info for the stylesheets were made. I'm keen to get involved and this is my first low-hanging-fruit attempt - so pointers are well appreciated!
I haven't done anything to the -rtl.css file, as I wanted to check - does that need to be abstracted into module.theme-rtl.css and module.admin-rtl.css or is there a new way of doing rtl css as part of the cleanup?
Comment #2
jvc26 commentedComment #3
jvc26 commentedFollowed the example put at module.system with the -rtl suffixes, and added the node-rtl.css refactoring to the patch.
Comment #4
jvc26 commentedComment #6
brianV commentedJust fixed the failing test. Since you renamed node.css, to node.theme.css, the test that referred to node.css failed...
Comment #8
jvc26 commentedThat patch strangely fails too - any ideas?
Comment #9
brianV commentedCatch pointed out that I had forgotten to add the new css files in the above patch. Re-rolled...
Comment #10
jvc26 commentedHmm ... just noted the discussion in the Comment cleanup (http://drupal.org/node/1216976#comment-4846766) pondering having simply .published and .unpublished. Does anyone, Jacine included, have any input on this?
Comment #11
jacineHey jvc26 & brianV! Thanks for getting started on this. Great work so far. ;)
This can be removed. Somehow either we forgot about this, or the patch wasn't committed correctly when we removed that horrid dl.multiselect code from Drupal 7.
Hmm, we can't possibly have a node.admin-rtl.css without a node.admin.css and with this patch, the RTL file wouldn't actually load anywhere. I think that we messed this up and forgot to remove this entire file in D7 somehow in the same patch I mentioned above, but we need to double-check if #node-admin-buttons exists anywhere, just in case.
Yeah, so I would definitely like to change this to just .unpublished and stick it in system.theme.css, but I didn't get any feedback in the other issue. :(
What do you think?
It would also be cool if we could stop adding a wrapper div here and just add a class indicating that the node is being previewed, but since that's a pretty significant change we can do that in a follow-up.
15 days to next Drupal core point release.
Comment #12
jacineOk, so that whole node.admin-rtl.css file should be removed. I double checked, and it looks like there was a mixup when code was being removed/moved to other files. That code block was supposed to be removed in this patch: #732914: Improve the markup/CSS for content and user filter forms.
Comment #13
jyve commentedLooking at the css in the current 8.x version, it looks like another patch already removed some of the css compared to when the first patch on this issue was created.
Attached is a new patch reflecting these changes, and incorporating the feedback from Jacine.
Overview of the changes in this patch:
- .node-unpublished has been changed to .published and was moved to system.theme.css. I will mention this in issue #1216976 so that these changes can also be incorporated there if this change gets through.
- updated Bartik to reflect the update from .node-unpublished to .unpublished.
- The selector .preview .node was changed to .node-preview since that seems the more appropriate class to use. I did not remove the preview div (yet) as it might still have a use if you want to target the entire preview.
- Moved all remaining css to admin.css and made sure this file is only loaded in the right places in the backend.
Comment #14
jyve commentedChanging status to 'needs review'.
Comment #16
jyve commentedWoopsie, needed to update one of the tests apparently.
Comment #18
jyve commentedI assume the test from the bot will need to be updated so putting this to 'needs review'.
Comment #19
jyve commentedNew patch attached also moves .node-preview to .preview in system.theme.css, to be in line with patch in #1216976: Clean up the CSS for Comment module.
The 'preview' div has been removed to avoid conflict with the .preview class now added to nodes and comments.
Comment #21
jyve commentedComment #22
xjmThanks for all your work on this issue. Looks like we may need to patch a test here. The test that is failing is:
CascadingStylesheetsTestCase->testAddCssFileWithQueryString()If we're changing something that will change what that test should expect, we'll need to include a fix for the test in the patch.
Note that the Drupal 8.x patch will need to be rerolled, because the core directory structure for Drupal 8 has now changed. (For more information, see #22336: Move all core Drupal files under a /core folder to improve usability and upgrades).
If you need help rerolling this patch, you can come to core office hours or ask in #drupal-gitsupport on IRC.
Comment #23
jyve commentedRerolled the patch for the new folder structure. Also added a @file header for the node.admin.css file.
An update for the simpletest module is included in the patch, but I assume I can't add a patch for the testbot myself?
Comment #25
xjm@jyve: Testbot runs drupal with your patch applied, so if your patch includes a change to a test, then testbot's tests run with that change. :)
Comment #26
jyve commentedaha, I indeed missed a test. New patch should be ok!
Comment #28
jyve commentedComment #29
jyve commentedComment #30
jyve commentedAnyone care to review the patch in #26? It would be nice to get this in together with the comment patch in #1216976: Clean up the CSS for Comment module
Comment #31
droplet commentedcan it without "td" ?
removed this one and no different
why the color here is diff to other status. I can see two 1px straight line there..
and the color value:
http://drupal.org/node/302199
15 days to next Drupal core point release.
Comment #32
jyve commentedThanks for the good feedback droplet!
- The color codes in node.admin.css have been updated to uppercase.
- The td could indeed be removed in node.admin.css, tested this against Bartik.
- There was an issue with moving the unpublished to system.theme.css since the pink background color was being overwritten in Bartik. This explains why the borders on the comment-arrow did not make since. I fixed this and it does make sense now.
- the margin/padding in Bartik does have an affect, it makes sure the content does not stick against the border of the 'unpublished' background color. This was propably invisible too due to the error mentioned in the previous line.
- I've opened a new issue to get Bartik to follow Drupal CSS coding standards, so that we can fix the lowercase color codes there.
Comment #33
jacineOh, this dropped off my radar without the tags. Anyway, tagging for this sprint. Thanks for the work on this so far @jyve.
Comment #34
jyve commentedSince there has been a good agreement to change color codes to lowercase (#1360790: CSS coding standards: Recommend lowercase not UPPERCASE hex colors), I have updated the patch accordingly.
Comment #36
jyve commented#34: node_css_cleanup-1217012-34.patch queued for re-testing.
Comment #38
aspilicious commentedI think node.admin.css is missing :)
Comment #39
jyve commentedow man, thx for pointing it out aspilicious :)
Comment #40
aspilicious commentedAdded the missing file
Comment #41
theborg commentedTested and looks good to me, only note that the css here:
is already attached here:
Comment #42
aspilicious commentedIn admin.css there is 1 line and that one covers revisions. And in node_revision_overview we alrdy attach admin.css . SO I think this must be a left over.
15 days to next Drupal core point release.
Comment #43
aspilicious commentedComming from #862854: No styling for sticky
we should also do:
I'm on it.
Comment #44
aspilicious commentedFinal one? :)
Comment #45
rasskull commented#44 look solid! I'm sleepy so I'm gonna check again in the morning when I'm a bit more sharp
Comment #46
jyve commentedhi aspilicious, looks like your patch will need to be rerolled, it no longer applies to the current Drupal version. I will be happy to review it once you re-roll.
Comment #47
aspilicious commentedreroll
Comment #48
aspilicious commentedreview... Please...
Comment #49
jyve commentedPatch tested, and looks perfect to me.
Let's get this one in before it needs to be rerolled!
Comment #50
jyve commentedgo go!
Comment #51
dries commentedIt looks like this patch introduces inconsistencies. Sometimes we prefix things with "node-" but other times we don't?
Comment #52
aspilicious commentedDries we decided to move some styling to the system module
That way we can reuse the classes for user, comments, ...
So they aren't realy part of "node" aymore thats why we removed the prefix on those.
Comment #53
tstoeckler.revision is still part of node, though. That seems like it should be in system.module as well. (Or actually should all those be in entity.module?)
Comment #54
aspilicious commentedAt the moment we don't have revision support yet in core for entities, only for nodes...
Unpublished and preview are not rly part of the entity structure entity
Comment #55
jyve commentedDries does make a good point.
I'm not a fan of the typical node classes either. All of them can be generalized, and especially the 'node-teaser' one is too hard-coded since there can be more than two View Modes from a technical point of view.
The new patch attached leaves us with the following classes:
node
node-$type
promoted
sticky
unpublished
view-mode-$view_mode (e.g. view-mode-teaser of view-mode-full)
preview
As we move more to entities, I am sure some classes will be able to move to that module.
All feedback is appreciated.
Comment #57
jyve commented#55: node_css_cleanup-1217012-56.patch queued for re-testing.
Comment #58
cosmicdreams commentedWhat does this patch need to advance? Manual / visual confirmation?
Comment #59
jyve commentedThis patch needs testing, and agreement on the generalizing of the classes.
Comment #60
cosmicdreams commented@jyve as in manual testing or do we need to write more functional tests? I'll help with either. I'll manually test this patch Saturday if no one else gets to it first.
Comment #61
KrisBulman commented#55: node_css_cleanup-1217012-56.patch queued for re-testing.
Comment #62
KrisBulman commented* patch applied cleanly on latest checkout of 8.x branch
* inspected the patch in a visual diff for errors/omissions of topics mentioned in this thread
* tested bartik changes and all classes are being applied properly on teasers
all good, patch has been manually reviewed.. there is a test in there for common.inc, which I honestly don't know what to do with, I'll leave it up to cosmicdreams to give it the final OK on Saturday.
Comment #63
cosmicdreams commentedCool, thanks @KrisBulman
Giving this a manual test as well:
Test with: Bartik & Stark
Created nodes
Previewed nodes
Edited nodes
Deleted nodes
Everything works and looks fine. No regressions discovered.
Comment #64
jhodgdonSo... The "agreement on generalizing the node classes" mentioned in #59, #55, and #51 -- should we get the Markup, Theme, and/or Node maintainers weigh in before considering this to be RTBC?
Comment #65
cosmicdreams commenteddemoting while we wait for those folks to weigh in.
Comment #66
jacineThis patch looks good to me. It's what I've been doing on D7 sites. Thanks for sticking with this @jyve and for testing @cosmicdreams.
Comment #67
webchickPutting this one on the jhodgdon pile, since it's a clean-up/coding standards task.
Comment #68
jhodgdon#55: node_css_cleanup-1217012-56.patch queued for re-testing.
Comment #69
jhodgdonThis doesn't look right to me, from bartik/css/styles.css:
Shouldn't there be a space before .sticky? Or maybe not... Isn't the sticky class going on the same div as the view-mode-teaser class? Maybe this some relatively new CSS thing I don't know about, where you can stick two classes together, but I've never heard of it. Please tell me I'm wrong. :)
Comment #70
jhodgdonProvisionally "needs work" until someone corrects my understanding (or the patch).
Comment #71
jhodgdonComment #72
jacine@jhodgdon That's on purpose. :) Both of those classes are on the same div. It's not new at all, but we've been unable to use it because of having to support IE6. All browsers, except IE6 understand this (for ID's too), and it's actually one of the main points of the patch and all the name changes. Here's some more information on it: http://css-tricks.com/multiple-class-id-selectors/ Let me know if you need more info. :)
Comment #73
jacineMore links for ya:
Comment #74
jhodgdonCool! A learning moment for me. Thanks for the information. :)
Committed to 8.x.
Comment #75
jacineSure :D Thanks!
Comment #76
jacineRemoving the sprint tag :D
Comment #77.0
(not verified) commentedUpdated issue summary.