Hi! I am interested in working on this feature for GSoC and is looking into it. I am wondering the migration cost and the design for back-compatibility, which I think may be very painful...
- How should the user attach a nested tag to a note? Note that we have CLI, so we have to find pure-text way to do that. I think we can only allow alphanumeric characters as tag names in future version, and use
xxx/yyy
to indicate the hierarchy. If a user already has some tags with/
in their names, use//
to escape. [^1] - What if a user uploads some nested tags and uses Joplin on another device with lower version? Note that we can't store nested tags in DB as
name = xxx/yyy
or it will conflict some top-level tags. We can add a column to indicate the parent ID of a tag though. But in old versions the backend is different, and the app may get confused by several tags with the same name. [^2]
Of course, there is always an ultimate solution, replace user's xxx/yyy
with xxx_yyy
or other patterns on the first launch of new version, and tell users "Hey surprise! We changed some of your tag names! You deserve this for having used strange symbolic tag names!" Not sure if we are gonna do this...
[^1]: If using \
to escape, the terminal may intercept and escape undesirably, and one needs to write \\
to actually let Joplin escape backslash. Another thought is using xxx.yyy
to indicate hierarchy. But using either ..
or /.
or \\.
to escape .
itself is painful. //
is at least acceptable for LaTeX users.
[^2]: Or we can still use xxx/yyy
to store nested tags, and replace all xxx/yyy
in the server with escaped version xxx//yyy
. Switching to old versions, some tags may be interpreted wrongly, but at least there will be less confusion?