Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redux integration #68

Open
5 tasks
abelino opened this issue Dec 30, 2017 · 0 comments
Open
5 tasks

Redux integration #68

abelino opened this issue Dec 30, 2017 · 0 comments

Comments

@abelino
Copy link

abelino commented Dec 30, 2017

We didn't have time to introduce redux into dragAndDrop from the beginning of the fork so we pushed forward with current architecture of dragAndDrop plugin. In order to clean-up current codebase and simplify data flow, we will need to integrate redux into the plugin. This effort will result in refactoring most of dragAndDrop.

  • add redux as a dep of dragAndDrop
  • remove usage of callbacks to pass/update data to parent containers
  • move logic to reducers
  • slowly start integrating actions
  • change how event obj are stored and track for changes internally *1

*1 During vertical/horizontal reorder there are a few props that are updated by dragAndDrop plugin: start, end, weight. But due to not having enough time to properly track and store changes, we mutate the original object in place. The ideal solution is to store the new props internally and once we call onEventReorder we pass to the user the following: list-of-original-events-that-were-reordered, props-that-need-to-by-updated, contains-a-new-event <- outsideEvent type... is important to the user, since he might need to take a different action if the reordered list contains a new event or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant