Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
261 stars 75 forks source link

Improve UX of drag and drop in List #9261

Open ashetland opened 2 weeks ago

ashetland commented 2 weeks ago

Check existing issues

Description

The current version of drag and drop in List doesn't scale very well. Sorting a long list of items in a short container can be frustrating. In this example, the list of items being moved is longer than the height of the container: CleanShot 2024-05-03 at 15 02 31@2x

Acceptance Criteria

Relevant Info

cc @driskull

Which Component

List

Example Use Case

No response

Priority impact

p3 - want for upcoming milestone

Calcite package

Esri team

Calcite (design)

github-actions[bot] commented 2 weeks ago

cc @geospatialem, @brittneytewks

ashetland commented 2 weeks ago

@driskull @geospatialem Marking this one as "ready". Matt and I have been in discussion about this one already. Final details may be adjusted as we work through it.

driskull commented 2 weeks ago

Im wondering if we might want to spike this and look into another library. We're kind of limited by the one we're currently using and it doesn't seem to be very actively maintained.

This library seems promising and seems to handle a lot of the issues you are seeing:

https://atlassian.design/components/pragmatic-drag-and-drop/examples https://atlassian.design/components/pragmatic-drag-and-drop/about

cc @jcfranco

Unfortunately, a lot of the other popular drag and drop libraries are tied to react so we can't use them. (dndkit).

ashetland commented 1 week ago

The Tree example seems to be almost exactly the behaviors we're looking for. In use, it feels like it would also solve the issues for #9262.

driskull commented 4 days ago

@jcfranco what are your thoughts?

jcfranco commented 4 days ago

Spiking sounds like a good idea to gauge effort and impact. Switching libs is something we could consider, given that SortableJS hasn't received updates in a while.

driskull commented 4 days ago

What I like about the pragmatic dnd approach is the keyboard support uses a menu on the drag target which makes more sense for moving between different lists and would solve that a11y issue.

ashetland commented 4 days ago

I also like that mouse users get that menu too if they only click.