Skip to content

refactor!: Replace SortableJS 4/4: remove the SortableJS dependency entirely - #1244

Open
6pac-ai wants to merge 1 commit into
refactor/drop-sortablejs-groupingfrom
refactor/remove-sortablejs-dep
Open

refactor!: Replace SortableJS 4/4: remove the SortableJS dependency entirely#1244
6pac-ai wants to merge 1 commit into
refactor/drop-sortablejs-groupingfrom
refactor/remove-sortablejs-dep

Conversation

@6pac-ai

@6pac-ai 6pac-ai commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Context

Final part of the SortableJS removal (port of slickgrid-universal's refactor(core)!: drop SortableJS dependency #2634). Stacked on the DraggableGrouping port PR. Column reordering and draggable grouping now run entirely on the built-in native HTML5 drag & drop engines in slick.interactions.js, so SlickGrid ships with zero runtime dependencies.

What's in here

  • package.json — the dependencies block is gone (sortablejs was its only entry); package-lock.json regenerated. A transitive sortablejs entry remains in the lock only through vite-demo's dependency on the published slickgrid@5.x package and disappears automatically on the next release.
  • Examples/tests sweep — the two SortableJS <script> tags (jsdelivr CDN + local fallback) removed from 103 example/test pages (149 lines, pure deletions); examples/sortable-cdn-fallback.js deleted. Nothing needed adding anywhere: every page already loads slick.interactions.js, which now carries the drag engines.
  • src/global.d.ts — the Sortable global declaration and its type import are gone.
  • eslint.config.mjsSortable removed from globals.
  • vite-demo — sortablejs dependency and the window.Sortable = Sortable shim removed.
  • scripts/builds.mjs — stale SortableJS-related comment removed.
  • README.md — the "1 small dependency" note becomes a zero-runtime-dependencies note; the historical v3 jQueryUI→SortableJS references are left as history.
  • The .slick-sortable-placeholder and .slick-droppable-sortitem-hover CSS class names are intentionally kept so consumers' custom CSS keeps working.

BREAKING CHANGE

SortableJS is no longer used nor required:

  • Consumers loading SlickGrid via script tags can delete their SortableJS <script> include; the window.Sortable global is no longer read.
  • Column reordering requires slick.interactions.js to be loaded (it already was in every example and is imported by the esm/cjs bundles).
  • SlickDraggableGrouping.getSetupColumnReorder() returns { columnReorderDragInstance } (changed in the previous part of this series).

A short wiki migration note (mirroring the v3/v4 removal pages) would be worth adding at release time.

Verification

  • Full 47-spec Cypress suite: 600/601 passing, 0 failures (1 intentional pending) with SortableJS absent from the dependency tree, every example page, and the globals.
  • Lint and strict TS declaration build clean.
  • Grepping the repo for sortablejs leaves only historical comments and the intentionally-kept CSS class names; the swept pages were spot-checked over HTTP to confirm they serve with zero references.

🤖 Generated with Claude Code

Final part of the SortableJS removal (port of ghiscoding/slickgrid-universal#2634).
Column reordering and draggable grouping now run on the built-in native HTML5
drag & drop engines in slick.interactions.js; the project has zero runtime
dependencies.

- package.json: remove the `dependencies` block (sortablejs was the only entry)
  and regenerate package-lock.json (a transitive sortablejs entry remains only
  through vite-demo's dependency on the published slickgrid@5.x package and will
  disappear on the next release)
- remove the SortableJS `<script>` tags (CDN + local fallback) from 102 example
  pages and 5 test pages; delete examples/sortable-cdn-fallback.js
- src/global.d.ts: drop the `Sortable` global declaration and its type import
- eslint.config.mjs: drop the `Sortable` global
- vite-demo: remove the sortablejs dependency and the `window.Sortable` shim
- scripts/builds.mjs: remove a stale SortableJS-related comment
- README: the SortableJS requirement note becomes a zero-runtime-dependencies
  note (historical v3 jQueryUI->SortableJS references are left as history)
- the `.slick-sortable-placeholder` / `.slick-droppable-sortitem-hover` CSS
  class names are intentionally kept so consumers' custom CSS keeps working

BREAKING CHANGE: SortableJS is no longer used nor required. Consumers who load
SlickGrid via script tags can remove their SortableJS `<script>` include; the
`window.Sortable` global is no longer read. Column reordering now requires
`slick.interactions.js` to be loaded (it already was in every example). The
`SlickDraggableGrouping.getSetupColumnReorder()` return shape changed in the
previous commit as part of the same effort.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@6pac 6pac changed the title refactor!: remove the SortableJS dependency entirely refactor!: Replace SortableJS 4/4: remove the SortableJS dependency entirely Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants