Follow-up to #1342054: [META] Clean up templates and CSS
Problem/Motivation
Bartik's code needs to follow Drupal's CSS Coding Standards.
Proposed resolution
Follow the guidance in the META to cleanup the code for the "help" component.
Help's CSS can be found in css/component/help.css in Bartik.
Remaining tasks
Write a patch
Visual review of the patch - check nothing is broken or the design has been changed.
Code review of the patch - check the work being carried meets standards and the changes make sense.
User interface changes
None, we are not changing the design/UI of Bartik, this is a code cleanup task.
API changes
n/a
Beta phase evaluation
| Issue category | Task because it does fix any bugs or adds any new features. |
|---|---|
| Issue priority | Normal because it does not affect current functionality. |
| Unfrozen changes | Unfrozen because it only changes css |
| Prioritized changes | The main goal of this issue is updating code to current CSS coding standards |
| Disruption | Not disruptive |
| Comment | File | Size | Author |
|---|---|---|---|
| #31 | interdiff-2408581-27-31.txt | 558 bytes | rachel_norfolk |
| #31 | clean_up_the_help-2408581-31.patch | 1.3 KB | rachel_norfolk |
| #27 | clean_up_the_help-2408581-27.patch | 770 bytes | rachel_norfolk |
| #24 | clean_up_the_help-2408581-24.patch | 542 bytes | Ieva Uzule |
| #8 | 2408581-7-after.png | 189.07 KB | idebr |
Comments
Comment #1
lewisnymanUploaded the css file so it can reviewed with Dreditor
Comment #2
emma.mariaComment #3
markot91 commentedComment #4
markot91 commentedAdded the file-comment. Properties grouped alphabetically.
Comment #5
markot91 commentedComment #6
idebr commented@MarkoT91 Nice work! Don't forget to unassign yourself when you set an issue to 'Needs review', since people might mistake the assignee for a reviewer :)
I have just one minor suggestion:
Nitpick: this needs 'the' before 'help region' so it reads: 'Bartik specific styling for the help region.'
Comment #7
markot91 commentedDone :)
Comment #8
idebr commentedAlright! I added a screenshot after patch to prove nothing broke:
Comment #9
zach.bimson commentedNoticed an issue with the commenting standards (new line following the comment), will create a new patch and submit.
Comment #10
zach.bimson commentedComment #11
zach.bimson commentedComment #12
idebr commented@zach.bimson Per our CSS formatting standards:
It appears you removed the blank line after the @file documentation block. Can you cite your source for removing this line?
When working with a previous patch, could you include an interdiff for reviewers?
Comment #13
zach.bimson commentedhttps://www.drupal.org/node/1887862#multi-line-comments
Same source as you, no new line appears after the comment
Comment #14
zach.bimson commentedComment #15
emma.maria@idebr
This means the @file declaration within the comment, not the comment formatting itself.
Here are the blank line standards, there should be no blank line after comments .... https://www.drupal.org/node/1887862#blank-lines
Comment #16
idebr commented@emma.maria Actually that is exactly what it means :). Open a random css file in /core/modules/system/css to check, for example /core/modules/system/css/system.admin.css:
[edit] Line breaks in
<code>are broken, nice...Comment #17
zach.bimson commentedAssuming Emma and i misunderstood the documentation, I've provided a new patch in compliance to your suggestions
Comment #18
zach.bimson commentedCreated this... can someone check itIssue
Comment #19
sarav.din33 commentedPatch applied successfully. While we open the /core/themes/bartik/css/components/help.css file comments are applied properly.
as mentioned in #12 css standards applied.
There is no need to check the user interface, eventhough i checked it also attached the screenshot of it.

Comment #20
sarav.din33 commentedReviewed & tested, please see comment above.
Comment #21
lewisnyman@idebr Thats a bad example, because the comment below the @file comment requires a comment above it. It seems like this is implemented really inconsistently in the CSS files. Looking through the PHP files, it seems like there is always a space below these comments. I guess we should just copy that?
The CSS standards are kind of vague, the @file PHP standards don't seem to mention blank lines... shall we update both of them to be more clear?
Comment #22
lewisnymanThe styling here is actually for the help region, not for the help page. Actually I think we should update the name of this file as well so it matches the name of the class.
Having two comments here seems a bit redundant, would you mind removing this one?
Comment #23
Ieva Uzule commentedI will be working on this today
Comment #24
Ieva Uzule commentedI have changed the file name and removed the comment as described in #22.
Here are the two patches.
Comment #26
rachel_norfolkUploading renamed interdiff. I forgot to mention to Ieva they need to be named .txt not .patch.
Bad mentor!
Comment #27
rachel_norfolkI think in #22Lewis was suggesting the comment should read "Styles for the help region." rather than help pages.
Apart from that, the filename was correctly changed etc.
Comment #28
emma.mariaRegarding #12, #15, #16, #21. I studied the API documenation and updated the CSS documentation to be more clear.
I will now review this patch while I am here :)
Comment #29
emma.mariaThanks for the patch @Ieva Uzule!
The patch applies and has the correct contents, but you forgot one small thing.
If we rename a CSS file we need to also add the new name within a file that declares which CSS files will be loaded in the front end by Bartik. So the new "region-help.css" is currently being ignored and the file is not being loaded on the site.
You need to create a new patch which includes going to the bartik.libraries.yml file and inside it change help.css to region-help.css
Looking forward to seeing a new patch :)
Comment #30
Ieva Uzule commentedThank you @emma.maria. How exciting! I will try and do this today.
Comment #31
rachel_norfolkJust the tidyup to keep this moving - so close!!
Comment #32
idebr commentedThanks, rachel_norfolk! Patch applies cleanly and updates the CSS file to all Drupal css standards.
I have added a beta evaluation to reflect this issue only changes CSS files.
Comment #33
alexpottCommitted b705771 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.