Skip to content

cloudcmd v10.7.0

Compare
Choose a tag to compare
@coderaiser coderaiser released this 14 Sep 09:37
· 1283 commits to master since this release

Good Bye Fancybox

Fancybox is a pretty good library for modal windows and it was used for a long time in Cloud Commander for all modals that you can see when: view file, edit file, open console or config window. But there are a couple things that disturb me for a long time about this library:

  • has not tests
  • uses jquery
  • big (30kb of jquery + 13kb = 43kb against 23kb of modal)
  • slow
  • does not support common.js, esm etc
  • license not compatible with MIT
  • cannot be installed with help of npm

Most features of fancybox were not used and some wrap used to fix some behavior.
Also, it can contain vulnerabilities which would not be fixed because fancybox v2 is deprecated and fancybox v3 has different look and API and it also depends on jquery.

All this influenced the decision to write modal simplest implementation with compatible API. It has such advantages as:

  • written on vanilla js
  • has no extra dependencies
  • has full test coverage
  • does most stuff using css
  • can be installed using npm
  • supports common.js, esm

It much smaller and bundled in cloudcmd.common.js so all modals will open much faster :).
If you find some incorrect behaviour let me know and I will think how to deal with it. This library can and should be used in any project that can't upgrade to fancybox v3 but want to use library that looks and works in a similar way as fancybox v2 and receive support.

fix

  • (cloudcmd) onUpdateFound: doubled prefix for cloudcmd.common.js (#188)

feature