Arbitrarily reorder namespaces, lists and tasks #115

Closed
opened 2 years ago by Lombra · 14 comments
Lombra commented 2 years ago

Preferably using drag-and-drop.

Preferably using drag-and-drop.
konrad added the
kind/feature
label 2 years ago
Owner

The api now supports sorting by a position attribute - all thats left is the frontend implementation.

The api now supports sorting by a position attribute - all thats left is the frontend implementation.

@konrad How would you go about telling the API to change the order of lists (or other things)? I don't see a field for that in the docs...

@konrad How would you go about telling the API to change the order of lists (or other things)? I don't see a field for that in the docs...
Owner

@profi248 Oh there is: https://try.vikunja.io/api/v1/docs#tag/task/paths/~1lists~1{listID}~1tasks/get
Look for sort_by and order_by.

@profi248 Oh there is: https://try.vikunja.io/api/v1/docs#tag/task/paths/~1lists~1{listID}~1tasks/get Look for `sort_by` and `order_by`.

@konrad Tasks have the position parameters which could probably be used this, but it's not available as a parameter for sorting according to the docs.

Maybe I'm missing something, but I don't see a way to change the order of lists/namespaces/buckets, as they don't have position or a similar field where can arbitrary order be stored.

@konrad Tasks have the `position` parameters which could probably be used this, but it's not available as a parameter for sorting according to the docs. Maybe I'm missing something, but I don't see a way to change the order of lists/namespaces/buckets, as they don't have `position` or a similar field where can arbitrary order be stored.

Now when I think about it, it seems that single position parameter for task will be problematic when you want to have tasks sorted differently in list and in kanban buckets.

Now when I think about it, it seems that single `position` parameter for task will be problematic when you want to have tasks sorted differently in list and in kanban buckets.
Owner

position could be used for sorting with a few small adjustments, that's not the hard problem. I'm open to suggestions for solutions to the "real" problem you identified in the second comment :)

Lists/Namespaces/Buckets would need to have that parameter added but again, wouldn't be that much of a deal.

`position` could be used for sorting with a few small adjustments, that's not the hard problem. I'm open to suggestions for solutions to the "real" problem you identified in the second comment :) Lists/Namespaces/Buckets would need to have that parameter added but again, wouldn't be that much of a deal.

Maybe the current position field could be changed to kanbanPosition and a new field called listPosition could be added. Each field would hold position for their respective views.

Maybe the current `position` field could be changed to `kanbanPosition` and a new field called `listPosition` could be added. Each field would hold position for their respective views.
Owner

I think that could work.

I think that could work.
Owner

Implemented in #620 and vikunja/api#923. A new unstable release containing the changes is already released, you can also test it on try.

Feel free to open a new issue or ping if you find something is not quite working.

Implemented in https://kolaente.dev/vikunja/frontend/pulls/620 and https://kolaente.dev/vikunja/api/pulls/923. A new unstable release containing the changes is already released, you can also test it on [try](https://try.vikunja.io). Feel free to open a new issue or ping if you find something is not quite working.
konrad closed this issue 3 months ago

Thanks, it seems to work nicely. This feature makes a big difference.

Thanks, it seems to work nicely. This feature makes a big difference.
Owner

I've just noticed a bug with kanban though, will take a look at that tomorrow.

I've just noticed a bug with kanban though, will take a look at that tomorrow.

I've just noticed the issue of not being able to reorder outside the boundaries of the current page in a paginated list view.

I don't even know what to suggest for that.

I've just noticed the issue of not being able to reorder outside the boundaries of the current page in a paginated list view. I don't even know what to suggest for that.
Owner

@SteveDinn I think the only way to really fix that would be to rework the pagination to an infinite scrolling thing instead of the "classic" pagination but that would bring up new problems. May be worth considering though.

@SteveDinn I think the only way to really fix that would be to rework the pagination to an infinite scrolling thing instead of the "classic" pagination but that would bring up new problems. May be worth considering though.

Yeah, there are def. advantages to both. With infinite scroll, its a pain to get to the end of the list. Even moving an item before or after one that's not currently on the screen (but the same page) is not that great either. infinite scrolling would amplify that.

I really dont know what the right thing to do here is.

Yeah, there are def. advantages to both. With infinite scroll, its a pain to get to the end of the list. Even moving an item before or after one that's not currently on the screen (but the same page) is not that great either. infinite scrolling would amplify that. I really dont know what the right thing to do here is.
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.