Code Monkey home page Code Monkey logo

Comments (6)

karolkozer avatar karolkozer commented on May 20, 2024

Hi @stichiboi,

I plan to add DnD to the component. I have some ideas for that but also I need to think about your solution.
I need to see and read the docs how the dnd-kit you are using works.

from planby.

karolkozer avatar karolkozer commented on May 20, 2024

Also, I have some ideas about functionalities which can be provided by Planby

from planby.

karolkozer avatar karolkozer commented on May 20, 2024

@stichiboi can you send the link to Codesandbox?

from planby.

stichiboi avatar stichiboi commented on May 20, 2024

Codesandbox

The original issue is not relevant anymore, I manage to solve the movement on different rows by:

  • Restricting to horizontal axis
  • Using the rectIntersection as the collision detection algorithm

You can recreate the bug by changing the collision detection to closestCenter (the one suggested by the dnd-kit tutorial).

I still think, from a user point of view, that having the channel rows separated into different components makes more sense than having just a huge list.
This also impacts performance, since every change with the DND triggers a render of all the items, even if I just changed one row.

Having a wrapper component means that you can also style every row differently.

from planby.

stichiboi avatar stichiboi commented on May 20, 2024

Small note: the scrolling while dragging the element is very bad. Probably it's dnd-kit's fault, I'm working on improving it.
It's something you might want to pay attention to if you want to implement it in planby

from planby.

stichiboi avatar stichiboi commented on May 20, 2024

Online I see a lot of examples for dnd libraries that implement Kanban Boards: I'm thinking that planby could implement something like that.

Examples (think of them as horizontal instead of vertical: each section is a channel, each task is a program)
dnd-kit
react-beautiful-dnd

Every row is a different board, and you can move programs between different boards.
Then you can rearrange the programs or the channels.

But you need row separation to do this.

There is actually another option with dnd-kit, which is to implement a custom sortingStrategy. I've tried writing something starting from the horizontal scrolling strategy, but definitely don't have the head to do it on a Friday afternoon 😅.

from planby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.