Note: This was originally its own ticket titled “Custom sorting order for status type when used to sort a set” which I opened because I misunderstood what this ticket was requesting and didn’t think there was a topic that already covered it. I’ll hide the parts of this port that I don’t think really add anything to this discusion now that it’s been merged.
Old note
Note: I’m essentially reopening an earlier ticket that was closed since it was originality closed because it had some overlap with another ticket but that other ticket was marked as completed without adding the particular functionality that the first ticket (and this ticket) is/was looking for.
Current behaviour
text
At the moment if you sort a set by a status type relation then the set will be sorted by alphabetical order of the text in of the selected status relation. Sometimes this is what you want but a lot of times it’s not. A common use of a status type relation is to track the status of something (I’m assuming that’s why the relationship type is named “status”) and status tend to have a meaningful order (“todo”, “in-progress”, “done” makes the most sense in that particular order. You probably don’t want this:
Desired behaviour
There maybe many ways of implementing this and I’m sure the very clued in anytype designers/devs can think of better ways of providing an interface for this. But this is how I’m imagining it could work:
Since the “semantically meaningful” order for a status type is probably going to be the same where ever/in most of the places it’s used I think it would make sense to allow you specify this custom order at the relation level. So maybe there’s a new “Set/Edit custom sort order” button (or something like that) under Library → Relations → the status type relation you want to specify an order for
. Clicking that gives you dropdown that allows you to drag the fields around like you can do with the groups setting for a kanban view:
Then when setting the order of a set if you pick that status field then along side slightly renamed “Alphabetical ascending” and “Alphabetical descending” options it could include a new option called something like “Custom sort”:
If someone has not yet set a custom order at the relation level then maybe clicking this option would bring up the same dropdown as would be provided if hitting the “Set/Edit custom sort order” on the relation page.
I don’t know how common of a use case this would be but possibly it might be nice to provide a custom order for a specific set (or set view) that overrides the custom order set at the relation level. So maybe when you hit “custom sort” in the list of options to sort a set by and the dropdown pops up allowing to to specify an order maybe there’s a checkbox or a ui or something that allows you to set that order ether globally at the relation level or locally just for this set/set view.
Use case
My particular use case since the sort of tasks on my personal todo rarely have hard date I like to keep track of them with fuzzy/relative due dates. All of them have a Relative scheduled date
that has one of these values:
.
Each week I’ll try to go though all of my future tasks and move any of them closer as needed. But if I have a busy week and don’t get a chance to do that then using this approch I don’t have a todo list with a week’s worth of tasks filling up my “Due today” list (like I would if I put calendar dates on each one) making me feel overwhelmed and reducing my moderation to maintain a todo list in the first place. It’s a very similar system to what’s often used with bullet journals which is where I discovered the approach and found that it worked well for me.
I want to be able to sort a set of future tasks by soonest (“This week”) to latest (“Someday” or “On hold”). At the moment use a kanban view on desktop since it will let you provide a custom order for the columns
.
But since the kanban view doesn’t work on mobile yet I also need to use some other views with the grid layout to see my tasks on there. However since you can’t provide a custom sort order for status type relations that is also a bit of a pain to use since I have quite a lot of tasks so scrolling though them to find where the next relative scheduled date when they’re out of order is a bit of a pain. So I’ve also made separate views for each relative scheduled date since you can order views however it’s presently a bit clunky to change between views on mobile you do it a lot.
What I really want is just be able to see all my upcoming tasks all on the screen at once, sorted in order from soonest to latest, and be able to look at that list in both the desktop and the mobile app. I’m not aware of any workarounds to do that (other than the one listed bellow which has it’s own drawbacks as mentioned) but if anyone has any suggestions I’m all ears!
Workarounds
text
The only real work around at the moment is to provide some prefix to the status value to force it to be the order you want when sorting alphabetically (generally using numbers, 1 -
, 2 -
, etc).
But it is definably not ideal to having numbers at the start providing visual clutter and making things harder to skim in a list, etc. And if you already have a lot of objects with a status type relation that you want to sort in a particular order (I currently have 122 objects using the relation I want to sort) then since there’s no way to bulk edit objects yet it’s a major pain in the bum to go though and individually add a number to each one. Even if you do that then should you wish to add a new value to your status field at some point in the future and you want that value to be ordered somewhere near the beginning then you’ll need to re go over every object that has a value that should be sorted after the new one and increase the number at the start of the value.
Additional info
Anytype/device technical details
Device: computer-hostname.lan
OS version: darwin arm64 13.2.1
App version: 0.33.3
Build number: build on 2023-07-18 21:58:21 +0000 UTC from at #087b1bff0634dc85980f1fb0cd8fcff4512e960c(v0.27.15)
Library version: v0.27.15
Account ID: A7jEYifY7VxjfYu18ucLydmd3rRQnwcdEyHGVvc8Y7D2TnWC
Analytics ID: 1491a2c4-5805-4f43-9064-b12896b694de
Device ID: A9ThSEMCYsXBvTqcsMi1tkqTaBZfMQixdAsHMMWnvSWtqG4d
Thanks for reading/your consideration!