Skip to content

feat: add drag & drop npm stats preset#1012

Merged
tannerlinsley merged 1 commit into
TanStack:mainfrom
tristanbob:feat/drag-and-drop-npm-preset
Jun 27, 2026
Merged

feat: add drag & drop npm stats preset#1012
tannerlinsley merged 1 commit into
TanStack:mainfrom
tristanbob:feat/drag-and-drop-npm-preset

Conversation

@tristanbob

@tristanbob tristanbob commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

This PR adds a new Drag & Drop preset comparing the most popular modern and classic drag-and-drop libraries in the JavaScript/React ecosystem.

The comparison includes:

  1. dnd-kit (@dnd-kit/core)
  2. Pragmatic DnD (@atlaskit/pragmatic-drag-and-drop)
  3. React DnD (react-dnd)
  4. SortableJS (Combined core + cross-framework wrappers)
  5. Hello Pangea DnD (Combined fork + deprecated original)
  6. React Draggable (react-draggable)
  7. React Grid Layout (react-grid-layout)
  8. React Rnd (react-rnd)

Key Design Decisions

1. Combo Logic (Wrapper/Version Consolidation)

To represent the true reach of the underlying engines without double-counting, we applied two distinct rules for library grouping:

  • Combined mutually exclusive wrappers (SortableJS): We combined sortablejs (vanilla core), react-sortablejs (React wrapper), vuedraggable (Vue 2 wrapper), vue-draggable-next (Vue 3 wrapper), and vue-draggable-plus (Vue 3 wrapper) under the SortableJS line. Since a project typically installs only one of these, combining them gives an accurate measure of total SortableJS engine adoption.
  • Combined legacy forks (Hello Pangea / Beautiful DnD): We combined react-beautiful-dnd (deprecated) and @hello-pangea/dnd (its active community fork/successor) under a single line. This represents the continuous adoption of this specific layout engine layout flow.
  • Excluded monorepo sub-modules (e.g. dnd-kit): We only targeted core packages (like @dnd-kit/core). We did not combine sub-modules (like @dnd-kit/sortable) because they are installed alongside the core package in the same project; combining them would double-count downloads and inflate the chart.

Summary by CodeRabbit

  • New Features
    • Added a new Drag & Drop comparison section with popular drag-and-drop package options.
    • Included several well-known libraries in the comparison, each shown with its own label and color for easier browsing.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f6ad5ecc-edb6-4acf-a86a-4ad352318aee

📥 Commits

Reviewing files that changed from the base of the PR and between 2da2d79 and 9442349.

📒 Files selected for processing (1)
  • src/routes/stats/npm/-comparisons.ts

📝 Walkthrough

Walkthrough

A new static comparison entry titled "Drag & Drop" is appended to the array returned by getPopularComparisons(). It defines eight package groups covering common DnD libraries (dnd-kit, Pragmatic DnD, React DnD, SortableJS, Hello Pangea DnD, React Draggable, React Grid Layout, React Rnd), each with label, package name(s), and a color.

Changes

Drag & Drop Comparison Entry

Layer / File(s) Summary
Add Drag & Drop comparison entry
src/routes/stats/npm/-comparisons.ts
Appends a new { title: 'Drag & Drop', packageGroups: [...] } object to the getPopularComparisons() return array with eight labeled DnD library groups and assigned colors.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • TanStack/tanstack.com#971: Also modifies getPopularComparisons() in the same file by appending a new static comparison entry.

Poem

🐇 Hop, drag, and drop with glee,
Eight libraries compared for thee!
dnd-kit leads the chart,
Each color its own art—
Stats page grows, so does the spree! 🎨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a new drag-and-drop npm stats preset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tannerlinsley tannerlinsley merged commit c74c135 into TanStack:main Jun 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants