Skip to content

Improve docs based on AI assistant chat analysis#2016

Merged
clauderic merged 13 commits into
mainfrom
claude/busy-bouman
May 5, 2026
Merged

Improve docs based on AI assistant chat analysis#2016
clauderic merged 13 commits into
mainfrom
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: 605cf1e

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: 605cf1e

@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 605cf1e Commit Preview URL

Branch Preview URL
May 05 2026, 11:53 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>
…docs

Verified all option signatures and defaults against
packages/dom/src/core/sensors/{pointer,keyboard}/*.ts.

PointerSensor docs (extend/sensors/pointer-sensor.mdx):
- Document the missing activatorElements option (designate alternative
  pointerdown targets via array or function-of-source)
- Document the missing preventActivation option (skip a pointerdown
  for a given event/source) — including the actual default which
  prevents activation on interactive descendants of the draggable

KeyboardSensor docs (extend/sensors/keyboard-sensor.mdx):
- Fix incorrect default for keyboardCodes.end — source includes
  'Tab' alongside 'Space' and 'Enter'
- Document the missing offset option (per-key-press pixel movement,
  number or per-axis object, default 10)
- Document the missing preventActivation option (default only allows
  activation when the focused target is the handle/element)
- Clarify the Shift modifier is a 5x multiplier, not a literal 50px

New React guide (react/guides/sensors.mdx, "Configuring sensors"):
- Where to configure (provider / per-draggable / per-instance)
- Customizing PointerSensor: activationConstraints, per-pointer-type
  branching on event.pointerType, activatorElements, preventActivation
- Customizing KeyboardSensor: keyboardCodes, offset, preventActivation
- Per-draggable sensors via useDraggable/useSortable
- Replacing vs. extending defaults — with a warning about preserving
  KeyboardSensor for accessibility
- Brief link out to migration guide for legacy MouseSensor/TouchSensor

Action-oriented guide titles:
- /react/guides/collision-detection: "Collision detection" → "Detecting collisions"
- /react/guides/modifiers: "Modifiers" → "Using modifiers"
- Both keep their original metaTitle for SEO; sidebarTitle matches the
  new title for sidebar/H1 consistency

Migration guide:
- Update Modifiers card title to "Using modifiers" to match the
  renamed page
- Add a link to the new Configuring sensors guide from the Sensors
  Note callout

Add the new sensors guide to docs.json navigation between
collision-detection and modifiers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Audit against packages/abstract/src/core/entities/{draggable,droppable}.ts,
packages/dom/src/{core,sortable}/...ts, and packages/react/src/...ts.

API NAME FIXES (would break user code if copied verbatim):
- The droppable option is `accept` (singular), not `accepts`. Source
  destructures `accept` from input — passing `accepts` is silently
  ignored. Renamed in:
    - apps/docs/docs/react/hooks/use-droppable.mdx
    - apps/docs/docs/react/hooks/use-sortable.mdx
    - apps/docs/docs/concepts/droppable.mdx
    - apps/docs/docs/concepts/sortable.mdx
  The instance method `accepts(draggable)` (verb form) is unchanged
  and remains correctly named.
- Tighten `accept` type signature to match source:
  `Type | Type[] | ((source: Draggable) => boolean)` — the function
  variant receives the Draggable, not just its type.

MISSING OPTIONS:
- Document `type` on useDroppable, useSortable, and concepts/droppable
  (used to identify the droppable for `accept` rules on others).
- Document `group` on useSortable (groups items for multi-list sorting,
  used by useSortable in packages/react/src/sortable/useSortable.ts).
- Document `alignment` on useDraggable and concepts/draggable (passed
  through to the Draggable constructor; type Alignment from
  @dnd-kit/geometry: `{x: 'start' | 'center' | 'end'; y: same}`,
  consumed by the Feedback plugin).

NEW HOOK DOCS:
- apps/docs/docs/react/hooks/use-drag-operation.mdx — documents the
  publicly-exported useDragOperation hook (returns reactive {source,
  target}). Sourced from packages/react/src/core/hooks/useDragOperation.ts
  and packages/react/src/core/index.ts (export).
- apps/docs/docs/react/hooks/use-drag-drop-manager.mdx — documents
  useDragDropManager (returns the manager from context, or null).

Both new hooks added to docs.json under React → Hooks navigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sidebar:
- Move useDragDropMonitor, useDragOperation, and useDragDropManager
  into a "Utilities" sub-group under React → Hooks. The three hooks
  are observation/escape-hatch utilities, distinct from the primary
  useDraggable / useDroppable / useSortable trio.
- Add support for a `defaultOpen: true` flag on nav groups in
  docs.json. SidebarGroupItem reads it and starts the group expanded
  even when the active page is not inside it. Plugins/Sensors keep
  their existing collapse-by-default behavior.
- Use icon `wrench` on the Utilities sub-group as a section marker.
- Drop the per-page icons from useDragDropMonitor, useDragOperation,
  and useDragDropManager — the indent under Utilities is enough
  visual hierarchy.

Guide titles (action-oriented, matching Detecting collisions / Using
modifiers / Configuring sensors):
- Feedback → Customizing feedback (frontmatter title + sidebarTitle,
  plus the Next steps card on the migration guide).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The custom ParamField component (used as both ParamField and
ResponseField via the alias in mintlify-components.tsx) only read
the `path` prop. Mintlify's <ResponseField> uses `name` instead, so
all 80 occurrences across React/Vue/Svelte/Solid hook/composable/
primitive Output sections rendered as headerless description-only
fields — missing the property name and type entirely.

Accept either prop and prefer `path` when both are present, matching
Mintlify's convention of distinct components for inputs vs outputs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@clauderic clauderic merged commit ee04213 into main May 5, 2026
14 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.

1 participant