Skip to content

Improve docs based on AI assistant chat analysis#2016

Open
clauderic wants to merge 9 commits intomainfrom
claude/busy-bouman
Open

Improve docs based on AI assistant chat analysis#2016
clauderic wants to merge 9 commits intomainfrom
claude/busy-bouman

Conversation

@clauderic
Copy link
Copy Markdown
Owner

Summary

Analyzed ~10K user interactions with the Mintlify AI assistant (Apr 7–14) to identify documentation gaps. The most common pain points were:

  • Migration confusion: Users constantly ask "what's the equivalent of X?" (DndContext, SortableContext, arrayMove, active/over, collisionDetection, etc.)
  • Package confusion: Users don't know which packages to install or that @dnd-kit/helpers exists
  • Missing keywords: Users search for "kanban" but the multi-list guide never uses that word
  • Event types undocumented: Users can't figure out the shape of onDragEnd event objects
  • React-specific modifier/feedback examples missing: Core docs show vanilla JS only
  • Touch/mobile questions: Users ask if it works on mobile, docs don't make it obvious
  • Duplicate items after refetch: Very common React Query integration issue with no guidance

Changes

  • Add API mapping table to React migration guide (14 legacy → new equivalents)
  • Add packages overview note to React quickstart
  • Add "kanban", "trello", "multi-column" keywords to multiple sortable lists guide
  • Add "Integration with external state" section covering React Query duplicate items fix
  • New page: React Modifiers guide (/react/guides/modifiers) with ref-based examples
  • New page: React Feedback plugin guide (/react/guides/feedback) with troubleshooting
  • Document event object structure on DragDropProvider page
  • Add "Touch and mobile" section to pointer sensor docs
  • Update docs.json navigation with new guide pages

All import paths, API names, option types, and default values were cross-referenced against the actual package source code.

Test plan

  • Verify docs dev server renders all modified and new pages
  • Check internal links resolve correctly
  • Review new pages for consistency with existing docs style

🤖 Generated with Claude Code

Analyzed ~10K user interactions with the docs AI assistant to identify
the most common pain points. Key changes:

- Add API mapping table to React migration guide (DndContext → DragDropProvider,
  arrayMove → move, active/over → operation.source/target, etc.)
- Add packages overview note to React quickstart
- Add kanban/trello/multi-column keywords to multiple sortable lists guide
- Add external state integration section (React Query, duplicate items fix)
- New React Modifiers guide with ref-based examples
- New React Feedback plugin guide with troubleshooting
- Document event object structure on DragDropProvider
- Add touch/mobile section to pointer sensor docs
- Update docs.json navigation with new guide pages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 15, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
dnd-kit 🟢 Ready View Preview Apr 15, 2026, 11:42 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 15, 2026

⚠️ No Changeset found

Latest commit: 2163bcc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 15, 2026

Open in StackBlitz

@dnd-kit/abstract

npm i https://pkg.pr.new/@dnd-kit/abstract@2016

@dnd-kit/collision

npm i https://pkg.pr.new/@dnd-kit/collision@2016

@dnd-kit/dom

npm i https://pkg.pr.new/@dnd-kit/dom@2016

@dnd-kit/geometry

npm i https://pkg.pr.new/@dnd-kit/geometry@2016

@dnd-kit/helpers

npm i https://pkg.pr.new/@dnd-kit/helpers@2016

@dnd-kit/react

npm i https://pkg.pr.new/@dnd-kit/react@2016

@dnd-kit/solid

npm i https://pkg.pr.new/@dnd-kit/solid@2016

@dnd-kit/state

npm i https://pkg.pr.new/@dnd-kit/state@2016

@dnd-kit/svelte

npm i https://pkg.pr.new/@dnd-kit/svelte@2016

@dnd-kit/vue

npm i https://pkg.pr.new/@dnd-kit/vue@2016

commit: 2163bcc

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 15, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
dnd-kit 2163bcc Commit Preview URL

Branch Preview URL
Apr 17 2026, 12:24 PM

- Move the API mapping table to the bottom of the guide so it serves as
  a reference after users work through the step-by-step migration
- Split the single large table into grouped AccordionGroup sections
  (Context & Provider, Events, Sensors, Collision detection, Modifiers,
  Sortable) — much more scannable and less visually dense
- Add a few additional mappings verified against source:
  - PointerSensor / KeyboardSensor from @dnd-kit/dom/sensors
  - closestCorners from @dnd-kit/collision
  - restrictToWindowEdges → RestrictToWindow
  - restrictToHorizontalAxis → RestrictToHorizontalAxis
  - createSnapModifier → SnapModifier
  - rectSortingStrategy → handled automatically

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tables nested inside <Accordion> components aren't parsed by MDX in
this Astro/Mintlify setup, leaving raw pipe characters visible to
users. Switch to flat H3 subheadings with tables — cleaner, reliable,
and each category now appears in the right-sidebar TOC for quick
navigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Users frequently ask what happened to SortableContext during migration.
- Remove it from the "Context & Provider" table (it's a sortable concept, not a generic context)
- Add a Note callout at the top of the Sortable section explaining it
  is no longer needed — useSortable auto-coordinates with
  DragDropProvider, and type/accept on useSortable replace the old
  container-level grouping
- Surface SortableContext as the first row of the Sortable table so
  migrators see it immediately when scanning

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verified against packages/dom/src/core/sensors/pointer/PointerSensor.ts:
- PointerSensor handles mouse, touch, AND pen via the native Pointer
  Events API — the legacy MouseSensor and TouchSensor are consolidated
  into this one class
- Per-input-type behavior is configured via a function passed to
  activationConstraints that branches on event.pointerType
  ('mouse' | 'touch' | 'pen') — there is no "inputType" option
- PointerActivationConstraints.Delay and .Distance are the correct
  static accessors for constraint classes

Changes:
- Add Note callout in Sensors migration section explaining the merge
  and showing a working activationConstraints function example
- Add MouseSensor and TouchSensor → PointerSensor mappings to the table
- Fix incorrect import path "@dnd-kit/dom/sensors" → "@dnd-kit/dom"
  (the dom package exports sensors from root; only ./modifiers,
  ./plugins/*, ./sortable, and ./utilities are subpath exports per
  packages/dom/package.json)
- Fix the same import-path typo in extend/sensors/keyboard-sensor.mdx

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New guide at /react/guides/collision-detection documenting all 7
built-in collision detectors with when-to-use-each guidance, plus
configuration, priority, custom detectors, and a migration mapping.

All detector descriptions verified against source in
packages/collision/src/algorithms/:
- defaultCollisionDetection: pointerIntersection → shapeIntersection fallback
- pointerIntersection: requires pointer inside droppable rect
- shapeIntersection: greatest intersection area, tie-broken by pointer distance
- closestCenter: 1/distance between centers
- closestCorners: 1/(average corner-to-corner distance)
- pointerDistance: 1/distance between pointer and droppable center
- directionBiased: only detects collisions in drag movement direction

Also verified:
- collisionDetector is per-droppable option on useDroppable/useSortable
  (packages/react/src/core/droppable/useDroppable.ts)
- CollisionPriority enum values Lowest/Low/Normal/High/Highest
  (packages/abstract/src/core/collision/types.ts)
- @dnd-kit/collision is a transitive dep via @dnd-kit/dom so no
  explicit install needed

Add the guide to React Guides navigation in docs.json.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add diagrams from the existing image library under each algorithm:
  - shape-intersection.svg for shapeIntersection
  - closest-center.svg for closestCenter
  - legacy/closest-corners.png for closestCorners
  (these are the same diagrams used in concepts/droppable.mdx)
- Remove the inline migration section — migration lives in the
  migration guide, the collision-detection guide just links to it
- Replace the section with a brief one-liner pointing migrators to
  the existing migration guide

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Match the icon used on the core /extend/modifiers page for consistency
across the docs. Updates both the guide's frontmatter and the Next
steps card in the migration guide.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The sliders icon is used on /extend/modifiers and was previously also
on /react/guides/sortable-state-management, which meant both cards in
the migration guide's Next steps showed the same glyph. Move sortable
state management to list-ol to keep sliders unambiguously modifier-ish.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant