Moving elements in lists

Got it! Will give it a go now, thank you.

This is basically the fractional indexing approach described above that Figma uses right?

Have got one related follow up (LMK if makes more sense to start a new thread for it) - since deleting a Y.Map from one array and adding it to another does not work, how would one “re-parent”?

For example - moving a file (Y.Map) from one folder (Y.Array) to another in a filesystem/tree like situation. Given this use case, does it make more sense for us to consider a different data structure e.g. Y.Map<File> has parent property pointing to id of Y.Map<Folder>? This would make it easy to “re-parent”, but it seems like we’d lose out on a number of neat yjs features such as the automatic child cleanup when deleting arrays etc.

Will let you know how well the indexing approach works once I have a moment to try it!