Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(open/learn) Re-ordering learning paths does not always work #3944

Open
ChristopherChudzicki opened this issue Apr 14, 2023 · 1 comment
Open
Labels

Comments

@ChristopherChudzicki
Copy link
Contributor

ChristopherChudzicki commented Apr 14, 2023

Steps to Reproduce

  1. 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:
    1. Create a new learning list. Add 5 items. Their positions are 0, 1, 2, 3, 4
    2. Open the "Add/Remove dialog" for first item (bookmark icon). Remove it & add it again. The positions are now 1, 2, 3, 4, 5.
    3. Add/Remove the first item again. The item positions are now 2, 3, 4, 5, 6.
    4. Repeat as desired
  2. 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
Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant