thombruce / toodles

✅ A super simple todo app
https://toodles.thombruce.com/
GNU General Public License v3.0
0 stars 0 forks source link

[Feature]: Add sorting function to VS Code extension #109

Open thombruce opened 4 months ago

thombruce commented 4 months ago

Feature request

Follows #108

Initially, I just want to add the simplest sorting function possible - lines, alphabetically. This is the beauty of the todo.txt format.

Caveat: I've already added implicit support for nested todos, denoted by indentation beneath a parent todo.

For the simplest possible sorting, this means either you have sortability or you have that feature... We don't want to ship the feature in that state, so this should not be considered complete until we treat nested todos as part of a "block" to be sorted.

Nested todos should also sort within their respective "block" beneath their parent todo.

Code of Conduct

thombruce commented 2 months ago

We can lift some logic out of packages/app for this. We had to figure out there how to sort nested todos... even though we don't officially support adding them there. The trick is the obvious trick:

Again, that's how it's handled in packages/app, so lift and repurpose the code from there.

Consider adding packages/core for shared utility functions/RegExes/etc.