Another feature could be to drop SortableJS #1239
Replies: 4 comments 4 replies
|
sure, will add this to the list! |
|
Here's the plan. Looks good to me. Any feedback before I set it going? Drop the SortableJS dependency from 6pac/SlickGridPlan drafted 2026-07-16, based on exploration of the local ContextSlickGrid's only runtime dependency is SortableJS, used for header column reordering and the draggable-grouping plugin. Upstream Two findings from exploration reframe the job and make it much smaller than "remove a dependency" suggests:
The real work is 5 Decisions taken
Port source and adaptation mapPort these three upstream files, adapted to 6pac idioms:
Idiom translations:
PR 1 — Cypress characterization tests (no
|
|
Just a note - your work account should have Opus and Fable as options. I use Opus on Max for most coding (eg. the typescript convertion/jquery removal), and it's fine, but I knew these Slickgrid features were really complex so I went all out for them with Fable on Ultracode. |
|
@ghiscoding Just one other thing - I'm generally not that fussed about bundle size. That's of course not saying you should throw caution to the wind and go with anything - I'm always keen to slim things if possible - but I think we have a different use case to a lot of the web. On commercial websites like Shopify sites, the visitor is often first-time and highly sensitive to page load time. If the page isn't snappy, you lose traffic. It's that simple. That's why there is a very understnadable obsession with bundle sizes and CDNs. However I (and I think you) design custom database-driven websites for business use, that people log into every day and use as part of their workflow. That means that firstly, they don't care about a small change in load time, and secondly almost everything they use as part of that website is already cached locally - which is even faster than downloading the files, no matter how small. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
hello @6pac another potential feature to ask, or get rid of actually, is to potentially drop SortableJS and use native code. I also that this would be a breaking change and reserve it for a potential next major version. So I actually already started that work in my own repo via this open PR that I also reserve for my next major (next year in my case):
ghiscoding/slickgrid-universal#2634
Dropping SortableJS would mean 0 dependency and also decreases install size, but it would also mean that we expect the end user to be using a modern browser (no more IE for sure). Why was I looking at doing that? It's mainly because SortableJS is starting to be a bit old now and we could with simpler code and we just don't need all of what SortableJS offers (all we really need is column reorder and also Draggable Grouping to a dropzone and that's it, only these 2 things).
I did my exploration via Claude Sonnet 4.6 mostly at work since I don't have any paid AI myself (I use the free copilot at home which are usually ChatGPT 5 mini with only 200 tokens/month). So my exploration works for the most part, but I'd be curious to see if Fable does a better job!? I know 1 difference with SortableJS is that my PR has no animations whatsoever, but we could probably live with any unless it's not too many lines of code... so anyway, you could ask Claude to read my PR and see if you can re-implement it in SlickGrid (I've done that couple time with SlickGrid vs my repos and the AI is able to compare easily by looking at the git diff and then compare and implement in the target repo)
Again that could be an exploration PR reserved for the next major version since it could impact users with behaviour changes
All reactions