Closed (duplicate)
Project:
Drupal core
Version:
8.1.x-dev
Component:
color.module
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Apr 2012 at 03:33 UTC
Updated:
21 Sep 2015 at 11:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
traviscarden commentedComment #2
roborn commentedUpdated patch to fix these errors.
Comment #3
ramlev commentedCleaned the code, to parse the drupal coder / codesniffer.
Comment #4
ramlev commentedThe patch in #3, is not complete, the color.module file wasen't added to the patch.
Heres a new try.
Comment #6
jeff.esquivel commented#4: drupal-color-coder-cleanup-1530724-4.patch queued for re-testing.
Comment #8
ramlev commentedIm fixing the patch and submitting it soon
Comment #9
traviscarden commentedPostponing till feature freeze. If you want to help in the meantime, please work on the blockers on the meta issue. Thanks!
Comment #10
sphism commentedWe have the go ahead with all these issues again, see #1518116: [meta] Make Core pass Coder Review for more details
Comment #11
markhalliwellComment #12
puregin commentedRe-rolled
Comment #13
markhalliwellThanks @puregin! Here's a few reviews:
Comment should probably be:
Prepares variables for color-scheme-form.html.twig.I'm curious why we're adding HTML back into preprocess. This should be left in the twig template. Also, this has nothing to do with coding standards and is changing logic/output.
This is one of my personal pet peeves :) CSS properties should always be alphabetized! Thank you very much for this! It makes me very happy :)
Looks like you forgot to remove the background at the bottom when you moved it. Also, is there a reason for removing
../?Comment #14
sphism commentedI've not reviewed this but I'm pretty sure it's array with a lower case a.
Does coder suggest Array ?
Comment #15
markhalliwellAh, great catch! I completely missed that. Yes it should be
array, no capitalization. (@see: https://drupal.org/coding-standards/docs#types)Comment #16
mikemiles86Comment #17
mikemiles86not able to work on this, I'm having issues getting coder to work in D8.
Comment #18
chrisfromredfinThis patch is a re-roll of the most recent patch plus the additional feedback since then.
Comment #20
deepakaryan1988Comment #21
deepakaryan1988I have created patch for this.
Comment #23
falc0 commentedshould be in single quotes like this:
Comment #24
ThisIsDog commentedI attempted to fix the syntax error on line 16 for the translation function.
Comment #25
ThisIsDog commentedComment #26
deepakaryan1988@ThisisDog #24 This patch seems good to me. Can anyone have a look on this.
Comment #27
markhalliwellThe CSS and Test changes were lost from #18 -> #21 with no explanation as to why.
Comment #28
visabhishek commentedI have Created a patch. Please review
Comment #29
linl commentedPatch no longer applies, tagging for reroll.
Comment #30
visabhishek commentedsimply reroll...
Comment #31
markhalliwellNow the
color.moduleand CSS changes have been lost. Please see the patch in #18.Comment #32
sriharsha.uppuluri commentedUpdated the patch with css
Comment #33
markhalliwellThis still doesn't include the changes to
color.modulein #18.Comment #34
visabhishek commentedi am merging the changes from color.module in #18
Comment #35
cs_shadow commentedFollowing errors remain after applying the patch in #34.
Comment #36
cs_shadow commentedFixing the errors in #35.
Comment #37
cs_shadow commentedComment #38
markhalliwellThanks @cs_shadow!
One final smaller nit pick:
We rarely use get_t() directly (unless it's the only one instance of it in the function). However we have four calls to the function, it would be better to assign it to the
$tvariable and then reference it like$t('...'). This just helps avoid unnecessary PHP calls; granted not making much of a difference performance wise, but it falls in line with our coding standards.Comment #39
cs_shadow commentedAttaching patch with changes as suggested in #38.
Comment #41
cs_shadow commented39: color.module-pass_coder_review-1530724-39.patch queued for re-testing.
Comment #44
markhalliwellDoh, forgot
get_t()was removed in 8.x: https://drupal.org/node/2021435Comment #45
cs_shadow commentedReplacing calls to
get_t()byt()simply. I got carried away with the codesniffer suggestions. Should work now.Comment #46
markhalliwellI know https://drupal.org/project/coder has a 8.x version, if you were using the latest dev and that reported the get_t() solution, a follow-up issue should probably be created in it's issue queue.
Comment #47
cs_shadow commentedI wasn't using 'Coder' module but command line 'drush dcs'. I'll check if there's an update for that.
By the way RTBC?
Comment #48
markhalliwellYes. From a code standpoint, this looks good. I'll need to manually test this though to ensure everything has been addressed. Give me just a second.
Comment #49
markhalliwellComment #50
alexpottThis is a standard the twig team has introdcued
These css changes appear to be going beyond a coder review?
Why keep calling this bigUser? Like to do we mean fat?
Comment #51
cs_shadow commentedAttaching patch that fixes the issues 1 & 2 mentioned in #50. Reg. bigUser, shouldn't we address it as part of another issue. Though IMO 'bigUser' should be replaced by something like 'adminUser'.
Comment #52
alexpott@cs_shadow I'm happy for the css to be alphabetised - it just appears that there are changes too.
Comment #53
cs_shadow commentedAlphabetised the css without changing any properties. Attached patch and interdiff.
Comment #55
linl commentedPatch no longer applies, tagging for reroll.
Comment #56
rajendar reddy commentedpatch reroll...
Comment #57
rajendar reddy commentedComment #58
Jalandhar commentedPatch #56 no longer applies. It needs to be re-rolled.
Comment #59
oriol_e9gReroll
Comment #60
jazio commentedPlease fix whitepaces.
Comment #61
jazio commentedComment #62
revagomes commentedRerolling with the whitespace fix.
Comment #63
revagomes commentedComment #64
blattmann commentedReviewing this issue.
Comment #65
blattmann commentedI've reviewed #62 manually for coding standards and things look good to me.
Comment #66
blattmann commentedComment #68
xjmThanks for all the work here so far. See #1518116-86: [meta] Make Core pass Coder Review. This issue is postponed until the meta issue is either closed or reopened.
Comment #69
pfrenssenClosing in favor of #2571965: [meta] Fix PHP coding standards in core, stage 1. In this issue the coding standards will be fixed on a sniff-per-sniff basis rather than a module-per-module basis.