[6.x] Ability to drag and drop between replicators #13042
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update of #10361 for v6.
CleanShot.2025-11-13.at.16.58.01-converted.mp4
Issues
There are a couple of issues with this in v6 that I've not yet figured out (help appreciated):
previewsprop andupdateSetPreviewsmethods no longer exist, so I've had to remove those calls. This means that previews get out of sync (wrong index) when you move a set from one replicator to another.Additionally, the previous version relied on the
closestVmfunction to track linked Vue components and allow replicators to talk to each other. This function no longer works in Vue 3 and I couldn't figure out how to make it work, so instead I changed the approach to have the sortable list component keep track of the related Vue components (listsvar andownerprop). This doesn't feel like a very elegant solution (neither didclosestVm), but I'm not sure how else to do it given the limitations of Shopfiy sortable.All notes and other changes from the previous PR also apply, except the not-allowed cursors which I've left out to simplify things and minimise UI changes.