angular-grid-layout icon indicating copy to clipboard operation
angular-grid-layout copied to clipboard

Feature Request - New Directive for Dragging Items into Grid

Open skutam opened this issue 1 year ago • 2 comments

Description: I propose adding a new directive to the Angular-grid-layout library that enables users to drag new items into the grid. Similar to the functionality provided by drag-drop in Angular's CdkDrag directive, this new directive, named ktd-drag, would facilitate the dragging of elements from an external source and dropping them into the grid layout.

Feature Details:

  • Name of the Directive: ktd-drag
  • Usage Scenario:
    • Developers can use this directive to enable the dragging of new items from a source and dropping them onto the ktd-grid.
    • It should seamlessly integrate with the existing Angular-grid-layout functionality.
  • Optional Parameters/Configurations:
    • Add inputs for data, disabled, dragStartDelay.
    • Add events for dragStart, dragMove, dragEnd.
    • Add new events to ktg-grid, dragEnter, dragLeave, dropped

Reasoning: While the current Angular-grid-layout library provides excellent support for managing the layout of existing items, there's a need for a dedicated directive to handle the dragging of new items into the grid. This new feature would enhance the library's versatility and make it even more powerful for a wide range of applications.

Note to Maintainers: I believe that the addition of this feature would significantly benefit the Angular-grid-layout community by providing a comprehensive solution for handling both existing and new items within the grid layout. Please consider this feature request, and I'm willing to implement it with assistance.

skutam avatar Dec 17 '23 14:12 skutam

Hi @skutam ! 👋 (sorry for my late reply 🙏 )

Thanks for proposing a feature like this 🚀! This feature is awesome and needed; many have requested it over the years. So, I am 100% aligned with adding it to the library.

About the Feature Details proposal and its implementation, I don't have much to add, I like your proposal 👍. I believe that it will fit perfectly within the angular grid layout as it is described. We might find some aspects to adjust during implementation, but the overall feature design is rock-solid 🪨

If you have some doubts when implementing this feature, don't hesitate to post them here or ask on Discord! Also, as soon as you have a draft solution, you can create a PR, so I can check it and provide guidance if needed!

llorenspujol avatar Dec 25 '23 10:12 llorenspujol

Hi @llorenspujol and @skutam,

@skutam I'm really interested in this feature. I've seen you 've done some job on it. How far are you to complete it? I checked your branch and it looks promissing.

@llorenspujol Once, he requests the PR, how long will it take you to merge it?

Regards,

mcrodriguezb avatar Mar 23 '24 07:03 mcrodriguezb