Needs review
Project:
Color backport
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Jun 2012 at 16:17 UTC
Updated:
17 Aug 2024 at 13:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
robloachhttps://gist.github.com/3006391#L6038
Comment #2
barrapontoThe problem is it doesn't have any other usable selector besides the IDs. So we might have to dig into the JS.
Comment #3
barrapontoThis is FUBAR. I mean, it needs to be addressed in color.module, color.js and the themes implementing it (including the js in the themes) :|
Comment #4
barrapontoSo, what I actually did was add classes, leave the ids the way they were. Trying to remove the ids would force me to go through the js files and it's enough of a patch for this file.
Comment #5
barrapontoThis still applies cleanly. Color widget seems unaffected by this patch (as supposed).
Comment #6
markhalliwellIf we're going to replace IDs with classes (which we should btw +1), you might as well remove the IDs entirely from the JS and HTML.
Comment #7
barraponto@Mark Carver, agreed, but it's quite some effort to remove the id from js. I suggest it as a follow up patch.
Comment #8
markhalliwell#4: csslint-color-1662958.patch queued for re-testing.
Comment #10
markhalliwellPatch needs to be rerolled against the latest HEAD.
On a side note, we may want to also refactor this patch against our CSS coding standards while we're at it.
Comment #11
iflista commentedWorking with this.
Comment #12
plopesc@iflista, marking as unassing given that there are no work for more than three weeks.
If you're interested on work on it, please reassign it.
Regards.
Comment #13
strykaizerWorking on this
Comment #14
strykaizerCss classes renamed as suggested in css code styling.
This patch also fixes Bartik, which overrides the color template.
Some js selectors had to be rewritten for this patch to allow the new code styling.
Comment #15
strykaizerNeeds review
Comment #17
jason.bell commentedIs the intention with CSS Lint to remove all errors, warnings, or both?
ZenDoodles asked me to upload this patch.
Comment #18
jason.bell commentedthose files you requested.
Noticed in the previous patch that the id "placeholder" was removed. It looks to me like the placeholder div is generated via the color.js and that farbtastic depends on the id "placeholder". I ended up adding a class on that element to apply style and layout css instead of calling #placeholder.
Comment #19
barrapontorun, bot!
Comment #20
markhalliwellWe should be following jQuery Coding Standards. I know this issue just said CSS, but when that changes, so does the markup/JS:
Comment #21
petermallett commentedDid some cleanup for JS/jQuery coding standards for variable names & using the context passed to attach. (https://drupal.org/node/172169 as well as https://drupal.org/node/1720586).
I wasn't sure what was meant by "proper event delegations" at this time, so this will probably need another pass.
This work was started during the Drupalcamp ATL code sprint for http://drupalmentoring.org/task/4416
Comment #22
areke commentedThis patch needs to be rebased against the current HEAD; it no longer applies.
Comment #23
lokapujyaComment #24
nod_I'd rather not mess with JS here. Just make the bare minimum changes please. Anything else should be dealt with in #1751334: Selectors clean-up: color module (and there is already a patch fixing things to review).
Also don't forget the JavaScript tag on JS issues. Otherwise JS maintainers can't have a look at it and will reopen the issue and probably complain, thanks :D
Comment #25
lokapujyaRemoved .js changes since they will be handled in another issue. Kept changes needed for using a class instead of the ID.
Comment #26
lokapujya25: 1662958-25.patch queued for re-testing.
Comment #28
lokapujyaRe-roll.
Comment #29
markhalliwellI think you forgot to remove the #id. Also, let's not change the name, just the specificity here.
There should be a single empty line at the end of the file (for git).
Comment #30
lokapujyaI kept the placeholder ID, per comment #18. (Something about Farbtastic.) The missing newline was in the existing code. Unassigning because I might not get to work on this for a while.
Comment #31
lokapujya30: 1662958-30.patch queued for re-testing.
Comment #33
lokapujyaI noticed #2268955: Deprecate farbtastic library and remembered this issue, so that placeholder ID can probably be removed with a reroll.
Comment #34
lokapujyaComment #35
markhalliwellAgreed. Let's postpone this until Farbtastic is removed. No sense in trying to clean up something that will end up just being removed anyway.
Comment #38
manuel garcia commentedJust removing the needs reroll tag, since this is going to be postponed for quite some time... farbtastic isnt going to be removed until #1651344: Use color input type in the color.module gets in, and that's postponed until Color input type gets support on all major browsers....
Comment #48
quietone commentedColor has been removed from core, #3270899: Remove Color module from core.
Comment #52
finnsky commentedSeems farbtastic library too old now,
I want to update it to simple color input or smth like https://shoelace.style/components/color-picker
But first i think we need to clean up that old css/js
This is first step. Nothing changed yet. Just cleanup