yorkie icon indicating copy to clipboard operation
yorkie copied to clipboard

Extend Move operation to work between Arrays and Objects

Open hackerwins opened this issue 3 years ago • 2 comments

The move operation still works only on the elements of an Array. It would be nice to expand this so that it can be moved between Objects and Arrays.

https://github.com/yorkie-team/yorkie/issues/43#issuecomment-612295610

We have an example of Kanban board on the demo page, and by completing this task we can show an example of moving cards between boards.

https://yorkie.dev/demo

hackerwins avatar Aug 25 '20 01:08 hackerwins

To do this, I think refactoring move operation to support both ParentCreatedAt and PrevParentCreatedAt is one of solutions. How do you think? If it is correct, I will try it (including yorkie-js-sdk)

jeemyeong avatar Sep 06 '20 17:09 jeemyeong

@jeemyeong

That's right. Since the target element needs to be moved between different parent elements, we need to pass PrevParentCreatedAt which is the previous parent's position and ParentCreatedAt which is the current parent's position to MoveOperation.

hackerwins avatar Sep 08 '20 00:09 hackerwins