Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sympa.js bundles part of MochiKit #334

Closed
xavierba opened this issue Jun 2, 2018 · 6 comments
Closed

sympa.js bundles part of MochiKit #334

xavierba opened this issue Jun 2, 2018 · 6 comments

Comments

@xavierba
Copy link
Contributor

xavierba commented Jun 2, 2018

sympa.js is bundling part of MochiKit.
See

// This copyright statement applies to the following two functions,
and below.
I think this should at least be separated to its own file or possibly be removed and the current version of MochiKit, in whole or in part, be used instead. I have not researched which version sympa.js is bundling, but here's a link to the file containing the 2 functions in the latest MochiKit stable version: https://github.com/mochi/mochikit/blob/MochiKit-1.4.2/MochiKit/Color.js

@ikedas
Copy link
Member

ikedas commented Jun 3, 2018

We probably may replace the code with external color picker plugins. Some examples:

@xavierba
Copy link
Contributor Author

xavierba commented Jun 4, 2018

Replacing the 2 functions from MochiKit with something else is probably a good idea, but in the meanwhile, would extracting this to its own file be feasible ? Or possibly import Color.js from the link above ? This may help with the later code replacement.

@xavierba
Copy link
Contributor Author

xavierba commented Jun 4, 2018

Just a note, the following files are used by the color picker and could be removed if it is replaced by something else:
www/icons/crosshairs.png
www/icons/h.png
www/icons/position.png
www/icons/sv.png

@ikedas
Copy link
Member

ikedas commented Jun 4, 2018

I mean at least this range of lines can be replaced by an external plugin. Besides,

  • It is possible to move two functions into a separate file. However, I feel a bit uncomfortable to put it together with other external js components.
  • btw, Color.js depends on a few other js files included in MochiKit, and importing it also requires them.

@ikedas
Copy link
Member

ikedas commented Jul 7, 2018

In PR above I chose jQuery MiniColors, because some major distributions (Debian and derivatives) provide package.

@ikedas
Copy link
Member

ikedas commented Aug 16, 2018

PR was merged. Closing.

@ikedas ikedas closed this as completed Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants