Skip to content

fix(OrderableList): not ordering when dragging and dropping#2695

Merged
SamuelAlev merged 3 commits intomainfrom
fix/orderable-list-not-so-orderable
Apr 23, 2026
Merged

fix(OrderableList): not ordering when dragging and dropping#2695
SamuelAlev merged 3 commits intomainfrom
fix/orderable-list-not-so-orderable

Conversation

@jcosta33
Copy link
Copy Markdown
Contributor

What

OrderableList's drag choreography (items shifting to make space) works in Storybook but does nothing once consumed from the published package.

Why

Our Vite config used the array form of Rollup's external, which only does exact-string matching. So @dnd-kit/react was external, but @dnd-kit/react/sortable (a subpath we actually use) wasn't. Rollup walked into it and bundled the transitive deps. Consumers ended up with two copies of dnd-kit's classes; the instanceof checks dnd-kit's registry uses internally silently failed and choreography never ran.

Storybook didn't see this because it builds from source single class identity, no duplication.

This is a known Rollup/Vite footgun:

Fix

Swap the array for a function that matches declared deps and their subpaths. One file, one option, no package.json changes.

Verified

Rebuilt the dist (no more inlined dnd-kit classes), yalc-linked into web-app, drag-and-drop works.

@jcosta33 jcosta33 requested a review from a team as a code owner April 23, 2026 11:20
@jcosta33 jcosta33 requested a review from SamuelAlev April 23, 2026 11:20
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

🦋 Changeset detected

Latest commit: 8241058

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@frontify/fondue-components Patch
@frontify/fondue Patch
@frontify/fondue-rte Patch

Not sure what this means? Click here to learn what changesets are.

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

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 23, 2026

Deploy Preview for fondue-components ready!

Name Link
🔨 Latest commit 8241058
🔍 Latest deploy log https://app.netlify.com/projects/fondue-components/deploys/69ea1851c2d2b0000872e9f8
😎 Deploy Preview https://deploy-preview-2695.components.fondue-components.frontify.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jcosta33 jcosta33 changed the title fix(OrderableList): not ordering when dragging and dropping fix(OrderableList): not ordering when dragging and dropping Apr 23, 2026
Comment thread packages/components/vite.config.ts Outdated
@jcosta33 jcosta33 requested a review from SamuelAlev April 23, 2026 13:02
@SamuelAlev SamuelAlev merged commit a2f79ae into main Apr 23, 2026
9 checks passed
@SamuelAlev SamuelAlev deleted the fix/orderable-list-not-so-orderable branch April 23, 2026 14:00
@github-actions
Copy link
Copy Markdown
Contributor

Lead time: 2 hours, 47 minutes, 50 seconds (2.80 total hours) from first commit to close.
Review time: 2 hours, 39 minutes, 55 seconds (2.67 total hours) from ready for review to close.

  • First commit: 23.4.2026, 13:12:19.
  • Ready for review: 23.4.2026, 13:20:14.
  • Closed: 23.4.2026, 16:00:09.

@jcosta33 jcosta33 mentioned this pull request Apr 27, 2026
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