Problem/Motivation
Follow-up for #3306208-24: Deprecate farbtastic in 9.5.x
Proposed resolution
Add the library
Remaining tasks
Wait parent commited, patch, commit, release
User interface changes
API changes
Data model changes
Issue fork color-3306607
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
lauriiiI don't think we should add the library code to the module because that's agains the security team policy: https://www.drupal.org/docs/develop/git/setting-up-git-for-drupal/drupal.... Maybe we could use a CDN or libraries API?
Comment #3
andypostAt least for now it could be a part of color 1.x - when we'll find volunteer to maintain it could be decoupled
Comment #4
catchOne of the exceptions to the no 3rd party library rules is:
(per https://www.drupal.org/docs/develop/git/setting-up-git-for-drupal/drupal...)
So... I think it would be OK to include it directly if other options are tricky.
Comment #5
longwaveDo we even need Farbtastic any more? The reason we used it was because long ago, browsers did not have color pickers. But since IE11 is no more all modern browsers support
<input type="color">- so should we consider refactoring the module to use the native color picker instead?Comment #6
andypostGood point! https://caniuse.com/input-color
Then it sounds like duplicate of #1651344: Use color input type in the color.module
Comment #7
wim leersPer @xjm.
Comment #8
wim leersSo, here too, we need to deal with the whole "how to ship an external asset library" question. For CKEditor 4, an exemption was made because of the vast security implications and extremely painful build process — see #3306909: Get Drupal Security Team approval to commit vendor/ckeditor.js to the drupal/ckeditor project.
That is not true here: https://github.com/mattfarina/farbtastic requires no build process whatsoever.
I think that here too we want to use an approach like https://git.drupalcode.org/project/quickedit/-/merge_requests/13/diffs?c... load
https://cdn.jsdelivr.net/gh/mattfarina/farbtastic@1.3u/farbtastic.jsfrom that external CDN.Also note that Drupal core claims to ship with version 1.2 but according to https://github.com/mattfarina/farbtastic/tags that simply does not exist 🤷
Thoughts?
Comment #9
longwaveThe missing 1.2 release has been an issue for years: https://github.com/mattfarina/farbtastic/issues/27
I don't know what the difference is between that and 1.3u, if anything.
edit: there seems to be no difference, given the output of
git log --p --follow core/assets/vendor/farbtastic/farbtastic.js; we added a header and moved the file around, but the code itself was last updated in #623292: Update FarbtasticI *think* that core.libraries.yml is wrong, and should say we are shipping 1.3u instead.
Comment #10
nod_From what I remember that 1.3 is yet another version.
Given that it's way way unmaintained, there is no tag = no CDN version, it could be an exception maybe?
Comment #11
nod_huh, yeah the version is wrong. I think I had it confused with joyride. so ignore my comment in #10
So yeah the cdn solution would work +1 to that.
Comment #13
nod_Something like this
Comment #14
andypostLooks right 👍
Commented nitpick about license abbreviation https://spdx.org/licenses/preview/
Comment #15
wim leers@nod_ the
failure means that we need to update the
*.info.ymlfile to add a test-only dependency on the Bartik contrib theme, since https://git.drupalcode.org/project/color/-/blob/2.x/color.info.yml does not yet do that.Had to do something similar for contrib Quick Edit the other day: https://git.drupalcode.org/project/quickedit/-/commit/00a8710d0796286626...
Comment #16
nod_all right, sweet.
Comment #17
wim leersComment #20
andypostThank you! pushed to 1.x and 2.x
Also tagged https://www.drupal.org/project/color/releases/1.0.3