thombruce / toodles

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

Optional Route Parameters #74

Closed thombruce closed 3 months ago

thombruce commented 1 year ago

Consider the use of optional route parameters: https://router.vuejs.org/guide/essentials/route-matching-syntax.html#optional-parameters

At present, we have separate routes for:

These could be strung together into a single route with optional parameters:

This would be strictly possible without slashes too, except that projects and contexts permit any non-whitespace character. Something that may need to be addressed if we want to do this, and the best way to address it might be to allow any non-whitespace character except slashes (making exceptions for @, +, ?, / and : is also an option).

We would obviously prefer that the user not use URL-unsafe or otherwise reserved characters but... this is not strictly disallowed by todo.txt.


This idea may be unworkable. Consider also a different approach to handling URL-based queries. We may yet need to escape/URL-encode some characters in project and context names.