sanity-io / orderable-document-list

Drag-and-drop Document Ordering without leaving the Editing surface
MIT License
75 stars 22 forks source link

Reset Order does nothing (at times) #6

Closed fabien closed 3 years ago

fabien commented 3 years ago

I have a list of documents that have not been assigned an order ranking yet. Choosing it from the top right menu does nothing. Again, intermittently, as it has been working on other occasions for me.

Locally, it only works once, just after reloading the app completely (full browser window reload). After that, none of the other lists are able to reset the order. I have multiple lists/types without such orders right now.

kmelve commented 3 years ago

I've set up a fresh e-commerce studio, installed the plugin, and am not able to reproduce this. Do you get anything in the console for the occasions where it doesn't work?

fabien commented 3 years ago

There are no errors or messages in the console. I just tried again. It will work exactly once after loading it up, it will not work on other schemas (that haven't been initialized with orders) thereafter.

When it works, I get the notifications in the bottom. A minor issue is that the message "X/Y Documents have no Order. Select Reset Order from the Menu above to fix." does not automatically disappear once it worked successfully.

Update: I also checked the raw data of those documents, and when it fails, those documents simply don't have any orderRank properties either.

fabien commented 3 years ago

@kmelve have you tried reordering a few different types?

SimeonGriggs commented 3 years ago

I'm able to recreate the issue, but only intermittently as you say. Will investigate. Thanks for reporting!

SimeonGriggs commented 3 years ago

This appears to be resolved in Studio version 2.21.8