Skip to content

Redux integration #68

@abelino

Description

@abelino

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions