hello-pangea / dnd

💅 Beautiful and accessible drag and drop for lists with React. ⭐️ Star to support our work!
https://dnd.hellopangea.com
Other
2.4k stars 93 forks source link

Allow combining without reordering #438

Open shifenhutu opened 1 year ago

shifenhutu commented 1 year ago

Description

Related: https://github.com/atlassian/react-beautiful-dnd/issues/374 https://github.com/atlassian/react-beautiful-dnd/issues/2168 https://github.com/atlassian/react-beautiful-dnd/issues/1390 https://github.com/atlassian/react-beautiful-dnd/issues/1315 https://github.com/atlassian/react-beautiful-dnd/issues/1514

100terres commented 1 year ago

Hi @hu-tu-yi-shi :wave:

Thank you for opening this ticket!

We’ll try to have a look at your feature request. We don’t know when we’ll be able to work on this. In the meantime, if you have the time to do the investigation pull request are more than welcome on this repo :slightly_smiling_face:

100terres commented 1 year ago

Hi @hu-tu-yi-shi :wave:

Me again! Could you properly document the issue in the description of this ticket to avoid back and forth between @hello-pangea/dnd and react-beautiful-dnd repos.

shifenhutu commented 1 year ago

hi @100terres

i am sorry for my english is not well

i am making a todo app now, like https://to-do.live.com/

i need drag tasks to a category,

this is my todo

image

this is my hope:

image

i find the combine feature https://github.com/atlassian/react-beautiful-dnd/blob/f8791a919974510f2f6667affddbe75896cfc78a/docs/guides/combining.md

the combine feature is good for me , but i don't know how to hidden the area (in my first picture)

shifenhutu commented 1 year ago

this is https://to-do.live.com/, it is good

when drag task to category, the category doesn't have space area

https://user-images.githubusercontent.com/104620424/204120401-6e51f907-2b8a-4342-9cd9-8415e260ee6a.mp4

this is my app , drag task to category is bad

when drag task to category, the category has a space area, i dont want the space area

https://user-images.githubusercontent.com/104620424/204120460-5e47bb59-452b-4072-8434-d0a5c238457c.mp4

cpakken commented 1 year ago

I'm interested in this too. I want to be able to combine without reordering. I thought about manually disabling the reoorder animation by remove the {styles} and {placeholder}...

uffou commented 11 months ago

I just submitted a pull request for this issue. In my particular situation, I needed to incorporate a drag-to-sidebar feature, but the sidebar was virtual, so droppables were not a viable solution since they cannot be added or removed during drag.

In order to solve this problem, I utilized an approach from a previous pull request made in 2019 and spent some time refining it until it was functional.

Pull: https://github.com/hello-pangea/dnd/pull/722 Preview: https://dnd-git-fork-uffou-main-hello-pangea.vercel.app/?path=/story/examples-board--with-combine-only

I need assistance with two tasks:

  1. Stop placeholder growth at source (Alternatively you can add a display:none to the placeholder in your implementation, but that is hacky), for my case virtual does not use placeholders.
  2. Someone to write tests