transcription mix-up after cutting
This is linked to the 3rd and last issue Thibaut explained in the emails. ( with the video )
Description
when we try performing a cut operation sometimes it causes the diplopanel to display inconsistent transcription data ( a duplication of the one line's transcription) . What happens is that the diploline component locates its corresponding DOM element using its visual position (nth-child) which can lead to incorrect updates after reordering
The attached image is a page where Thibault managed to reproduce the issue (while cutting line 37 and then trying the undo with ctrl+z), after cutting a line the diplopanel shows that line 37 is displaying transcription data duplicated from another line.
Possible solution
a possible solution is to modify the diploline component to use the unique line pk for its DOM lookup -> by assigning a data-line-pk attribute to each diploline element and then querying the element by that atribute instead of its index, we can make sure that each diploline always updates its own transcription content correctly, regardless of reordering
