pragmatic-drag-and-drop
pragmatic-drag-and-drop copied to clipboard
Docs: Hitbox example import broken
Not 100% if this might be because I did something wrong with the imports, but seems like your example at https://atlassian.design/components/pragmatic-drag-and-drop/optional-packages/hitbox/about uses a broken import:
I did some research and if I replace @atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge with @atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge (leaving out the /addon) it does the job for me.
Generally speaking I find all those imports a bit confusing and would prefer to have one package with all those packages which for my understanding should have the same bundle size if tree-shaking is enabled? VS code often mixes up auto-suggestions and recommends some paths to the /dist directories which can be quite confusing. (see this)
Except that I really like your library, thank you so much!!
Also the import for the scrollJustEnoughIntoView is broken unfortunately.
(Generally I find it super hard to find this information through the navigation, as it is hidden in a sub sub view).
The import should be import { scrollJustEnoughIntoView } from '@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view'; (the /element is missing in the example)
Generally speaking I find all those imports a bit confusing and would prefer to have one package with all those packages which for my understanding should have the same bundle size if tree-shaking is enabled
Exactly my thoughts, this library, and the add-ons are prime examples of overthinking and making it worse. Bundlers will do the job just fine that's why we have them. The amount of people working without bundlers is minimal, for those who work without bundlers all these packages can stay how they are but for the majority of people the version that is published to npm should be a package with all the modules, and developers will use only the module they need that`s how ESM works, bundlers will take care of the rest.
Thanks for raising this! These examples and several others have now fixed.