New "Reset order" button buggy in many common scenarios

Created on 17 February 2025, about 2 months ago

Problem/Motivation

As currently built, the recently new "Reset Order" button does not work well if:
* There are multiple pages of results
* If the View has a limit on the number of results to show
* If there is a secondary sort

Steps to reproduce

1. Create a view with draggable views. Sort by draggable views 1st, and then nid second. Set the pager to show only 5 items.
2. Create more than 5 test nodes (create more than 2x the view limit to really see the whacky results)
3. Go to your draggable view. Click "Reset Order". All looks good.
4. Drag item 3 to the top. Click "Save". Observe mayhem

Proposed resolution

Rather than deleting items in the draggable views table, instead just zero them out. Also act on all items with the current arguments, not just those visible on the current page.

Remaining tasks

1. Agree
2. Write code change
3. Write tests
4. Commit
5. Release

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇲🇽Mexico dalin 🇨🇦, 🇲🇽, 🌍

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024