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

Sorting by "file-order" and reversing sort-order #306

Closed
dnngll opened this issue Dec 16, 2021 · 9 comments
Closed

Sorting by "file-order" and reversing sort-order #306

dnngll opened this issue Dec 16, 2021 · 9 comments
Assignees
Labels
feature request help wanted Extra attention is needed

Comments

@dnngll
Copy link

dnngll commented Dec 16, 2021

Did you check if a similar feature request has already been reported?
Yes. Also, @ransome1 suggested to start a new issue.

Is your feature request related to a problem? Please describe.
Yes:

I use todo.txt on several devices with several different programs.

Android:

  • Obsidian
  • Simpletask

Windows:

I am using all of the above sorting by "file-order", and would like to use that for sleek as well.

Describe the solution you'd like
I am stealing from my own post #296 (comment):

It would be really helpful, if there was also an option to sort by "file-order" and "reverse-file-order". So the sorting would be either "line 1, line 2, line 3..." or "last line, second-last line, third-last line...".

The way I see it, one could either have 2 different sorting options ("file-order" and "reverse-file-order"). Or there could be an "ascending/descenting" toggle. The second solution is way more sexy, since one could then reverse the sorting of all the other methods as well.

Thanks!

Describe alternatives you've considered
I didn't find any

@ransome1
Copy link
Owner

@dnngll I agree that a reverse sorting toggle will be the best solution in addition to another setting that might be called sort by file order or something similar. My goal eventually is to keep sleek clean of bloat, so we need to reduce only settings which serve the majority of the users.

Thinking about how to implement it I'm having trouble figuring out the best solution for users. If we just invert the list by file order, this is simple, as there is only one sorting dimension to change, right? But for the regular usage sleeks UI is based first on groups and then on whatever is happening within those groups.

So let's assume you have a list grouped by priority and within this group the next sorting method is contexts. Currently this would look like this

If we invert both the group sorting and the item order, this would look like this

I'm not sure if this makes sense to also invert sorting within the groups for most of the users. If you for instance set due date as your second sorting option, this would mean that the most recent todo will be moved down and will not be pinned to the top of the group.

Do you have any thoughts on this?

@ransome1 ransome1 added discussion help wanted Extra attention is needed labels Dec 18, 2021
@dnngll
Copy link
Author

dnngll commented Jan 5, 2022

Hello @ransome1 ,

thank you for your text. I indeed have an idea on how this problem could be sorted out in a very elegant way. Shame on me for using mspaint for my mockup:

image

One would be able to move the "sort-by" up and down with the handle via drag-and-drop, and change the order individually by clicking on the "sort-order-icon". Every possible way of sorting is possible like that, for example

  • ↑ Completed
  • ↑ Due date
  • ↓ Creation date

would sort by completed first (no need for that in the options-menu anymore), followed by sorting by due date (next due first), followed by creation date (last created first). Very easy to configure and very powerful.

What do you think?

@dnngll
Copy link
Author

dnngll commented Jan 5, 2022

@ransome1 adding to my comment above, do you know the Android-App Simpletask? That's how they do it:

2022 01 05, 14 55 53 Sort order (Screenshot_20220105-135919) png - JPEGView

In the screenshot above the sorting "stops" after "File Order", due to the fact that a single line is the smallest "unit" and can't be sorted any further. Am I making sense?

Do you like the way sorting is handled in that app?

@ransome1
Copy link
Owner

Hello @ransome1 ,

thank you for your text. I indeed have an idea on how this problem could be sorted out in a very elegant way. Shame on me for using mspaint for my mockup:

image

One would be able to move the "sort-by" up and down with the handle via drag-and-drop, and change the order individually by clicking on the "sort-order-icon". Every possible way of sorting is possible like that, for example

  • ↑ Completed
  • ↑ Due date
  • ↓ Creation date

would sort by completed first (no need for that in the options-menu anymore), followed by sorting by due date (next due first), followed by creation date (last created first). Very easy to configure and very powerful.

What do you think?

As I myself don't really use this kind of sorting and there are plenty urgent matters in sleek to work on I'm afraid I can only provide a simple solution to this at this point. In this pre release you will find a toggle to enable the sort by file option and you will be able to invert sorting with another new option. If sort by file is enabled all the other sorting methods will be disabled.

The options mentioned can be tested in this pre release: https://github.com/ransome1/sleek/releases/tag/v1.1.6-rc.3

@dnngll
Copy link
Author

dnngll commented Jan 13, 2022

Oh, I understand, thanks for the info! And thanks for adding it, this is making Sleek so much more useful already. I just tried it out now, some quick feedback: The "Completed at the end"-toggle does not work when sorting as in file. If I come across anything else I will post it here of course...

Thanks again!

@ransome1
Copy link
Owner

Thanks for your feedback. The sort by file method is quite strict and literally disables all other sorting or grouping on purpose. Except the inverting. That's why the sort at the end toggle doesn't work in this setting and maybe should also be hidden in this case.

@dnngll
Copy link
Author

dnngll commented Jan 13, 2022

Yea, that's what I thought. I don't really think it needs fixing, since it's only temporary and you're quite busy anyway. Just wanted to let you know.

Sleek's getting more and more awesome by the day, this last fix replaced todo.txt as my tool for "readonly"-usage!

I sure hope that #68 can be addressed in the near future. Then we'd be able to alter the todo.txt as well. Do you have any idea if that's gonna happen anytime soon (I know there's a dependency that you have no control over)?

Thanks again!

@dnngll
Copy link
Author

dnngll commented Jan 13, 2022

Adding to my last comment: jmhobbs/jsTodoTxt#5 is the dependency I was referring to.

@ransome1
Copy link
Owner

I sure hope that #68 can be addressed in the near future. Then we'd be able to alter the todo.txt as well. Do you have any idea if that's gonna happen anytime soon (I know there's a dependency that you have no control over)?

Sorry for my late reply. Unfortunately I'm not directly connected to that project and we're relying on the guys over there to address this issue. Up until then the only way to solve this would be to find a JavaScript developer who could contribute this enhancement to the jsTodoTxt project.

Due to backlog maintenance I am closing here and hope you don't mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants