refactor!: Replace SortableJS 4/4: remove the SortableJS dependency entirely - #1244
Open
6pac-ai wants to merge 1 commit into
Open
refactor!: Replace SortableJS 4/4: remove the SortableJS dependency entirely#12446pac-ai wants to merge 1 commit into
6pac-ai wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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— thedependenciesblock is gone (sortablejs was its only entry);package-lock.jsonregenerated. A transitive sortablejs entry remains in the lock only through vite-demo's dependency on the publishedslickgrid@5.xpackage and disappears automatically on the next release.<script>tags (jsdelivr CDN + local fallback) removed from 103 example/test pages (149 lines, pure deletions);examples/sortable-cdn-fallback.jsdeleted. Nothing needed adding anywhere: every page already loadsslick.interactions.js, which now carries the drag engines.src/global.d.ts— theSortableglobal declaration and its type import are gone.eslint.config.mjs—Sortableremoved from globals.window.Sortable = Sortableshim 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..slick-sortable-placeholderand.slick-droppable-sortitem-hoverCSS class names are intentionally kept so consumers' custom CSS keeps working.BREAKING CHANGE
SortableJS is no longer used nor required:
<script>include; thewindow.Sortableglobal is no longer read.slick.interactions.jsto 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
🤖 Generated with Claude Code