(open/learn) Re-ordering learning paths does not always work
Opened this issue · 1 comments
ChristopherChudzicki commented
Steps to Reproduce
- Create a learning path with multiple items, where the first item in the path has
position
greater than zero. One way to do this is:- Create a new learning list. Add 5 items. Their positions are
0, 1, 2, 3, 4
- Open the "Add/Remove dialog" for first item (bookmark icon). Remove it & add it again. The positions are now
1, 2, 3, 4, 5
. - Add/Remove the first item again. The item positions are now
2, 3, 4, 5, 6
. - Repeat as desired
- Create a new learning list. Add 5 items. Their positions are
- On the learning path page at
/learn
, swap the first and second items.
Expected Behavior
UI and backend both update correctly.
Actual Behavior
UI updates. Reload page => old ordering. The backend and UI had different states.
Screen.Recording.2023-04-14.at.12.14.00.PM.mov
ChristopherChudzicki commented
Question: How do we expect the backend to be handling updates to list order? Do we expect that the lists in the database are always 0, 1, 2, ... N
, or do we just expect that they are monotonically increasing?