zikula / core

Zikula Core Framework
GNU Lesser General Public License v3.0
238 stars 66 forks source link

update/remove unneeded JS vendors #2416

Closed craigh closed 7 years ago

craigh commented 9 years ago

Several vendors are included in our own repo.

Many of these, in combination with those included at by composer, are either redundant, woefully out of date, or irrelevant.

These libraries should be updated or removed as appropriate. Some others should be justified for the continued inclusion in the core.

possible redundancies: Color

  1. PickyColor
  2. jquery-minicolors

shim/shiv/polyfill

  1. Webshim
  2. Modernizer
  3. html5shiv

tree

  1. jstree
  2. Zikula.Menutree.Tree.js

calendars

  1. DHTML calendar
  2. jQuery calendar

There are others probably . I realize SOME of these are present due to BC concerns and this is understandable.

For 2.0.0 we should significantly reduce this...

@shefik @cmfcmf @Guite

shefik commented 9 years ago

I don't think we need html5shiv anymore, since we have dropped support for older versions of IE.

"The HTML5 Shiv enables use of HTML5 sectioning elements in legacy Internet Explorer and provides basic HTML5 styling for Internet Explorer 6-9, Safari 4.x (and iPhone 3.x), and Firefox 3.x."

https://github.com/aFarkas/html5shiv

shefik commented 9 years ago

We currently use Modernizr 2.6.2, but the latest version is Modernizr 2.8.3, so it should be upgraded. It is still useful for detecting browser features and applying custom CSS classes, based on the detected features. Modernizr is not a polyfill, so it doesn't add features to a browser. It only detects what is available. Webshim is polyfill that adds features. So, the two can work in conjunction with each other.

shefik commented 9 years ago

Both PickyColor and jquery-minicolors can probably be removed, because we should use the HTML5 native "color" input type. For browsers that don't currently support the "color" input type, Webshim can load its polyfill.

Demo:

http://afarkas.github.io/webshim/demos/demos/cfgs/input-color.html

Guite commented 9 years ago

PickyColor is for BC only. jquery-minicolors could indeed be removed (was added in #1728).

As this issue is scheduled for 2.0.0 probably both scripts can be removed then without problems.

Guite commented 9 years ago

Depends on #2034

Guite commented 7 years ago

How about removing the following ones, too:

  1. https://github.com/zikula/core/tree/master/src/javascript/jquery-plugins/jQuery-Timepicker-Addon -> not needed as the browser (or webshim polyfill) provides a time picker

  2. https://github.com/zikula/core/tree/master/src/javascript/plugins/colorbox -> we also include magnific popup as a lightbox solution https://github.com/dimsemenov/Magnific-Popup here https://github.com/zikula/core/blob/master/src/system/ThemeModule/composer.json#L25

  3. https://github.com/zikula/core/tree/master/src/javascript/plugins/jQuery-contextMenu -> Bootstrap context menus are more accessible and compatible with touch devices