I would like them to show-up in the normal tags view in the sidebar. (but perhaps have a toggle there as well to hide/show "zero-content" tags. Or perhaps have sorting option of either alpabetical and number-of-note (sorted from most to zero).
Let's see what Laurent says. This has been requested a few times, but I'm still not quite sure what sense it makes to show them in the sidebar when clicking on one of those zero-notes tags will yield no result, but ok. IMO it would make more sense to show them in the dropdown when assigning tags, but that's just me.
I'm apparently not qualified to talk about tags according to several people.
But actually it would be a very nice option. I am tired of adding my zero-tags to one "central" note. All the time should think "OK, I created a new tag, let's add it to another note in a case I will delete this one". And I do not talk about syncing issues after this "central" note has more than 100 tags... So now I have more than one "central" note.
But it won't be so simple as you wrote. After implementing "not deleting zero-tags" it would be necessary to implement some way to delete tags manually. So it would be additional work, I think.
@laurent what do you think? I remember this has come up not only in this thread.
Can I add an option maybe in Appearance or Note under the Advanced section: Show tags with 0 notes. I think for now we just show these tags in the dropdown when assigning tags.
In the future we might want to show them in the sidbar as well and allow people to actually delete tags.
What was the reason again for not allowing a delete tag operation? Afaik they are not tracked in note history, so it should be straight forward, unless I'm missing something.
I don't understand. We were talking about an option to show the removed tags which are not associated with any notes. Because there's no way to delete tags in Joplin. They will stay in the database forever.
This is the code that would allow to show all tags in the dropdown when setting tags:
commit 2d648554a04006fd25187f169be800a3e4456696
Author: Helmut K. C. Tessarek <tessarek@evermeet.cx>
Date: Sat Oct 31 01:08:09 2020 -0400
show all available tags in the dialog when adding/removing tags
diff --git a/ElectronClient/gui/MainScreen/commands/setTags.ts b/ElectronClient/gui/MainScreen/commands/setTags.ts
index 9acad2a1f..b3e4e9752 100644
--- a/ElectronClient/gui/MainScreen/commands/setTags.ts
+++ b/ElectronClient/gui/MainScreen/commands/setTags.ts
@@ -23,7 +23,8 @@ export const runtime = (comp:any):CommandRuntime => {
// but treats caps as equal
return a.label.localeCompare(b.label, undefined, { sensitivity: 'accent' });
});
- const allTags = await Tag.allWithNotes();
+ // const allTags = await Tag.allWithNotes();
+ const allTags = await Tag.allTags();
const tagSuggestions = allTags.map((a:any) => {
return { value: a.id, label: a.title };
})
diff --git a/ReactNativeClient/lib/models/Tag.js b/ReactNativeClient/lib/models/Tag.js
index 56530b489..c44594efc 100644
--- a/ReactNativeClient/lib/models/Tag.js
+++ b/ReactNativeClient/lib/models/Tag.js
@@ -113,6 +113,10 @@ class Tag extends BaseItem {
return await Tag.modelSelectAll('SELECT * FROM tags_with_note_count');
}
+ static async allTags() {
+ return await Tag.modelSelectAll('SELECT id, title FROM tags');
+ }
+
static async searchAllWithNotes(options) {
if (!options) options = {};
if (!options.conditions) options.conditions = [];
I believe we stopped previous discussion on this point
Because if we can't delete tags in Joplin, it is pointless to discuss this question. If you "show" all tags hidden from user without possibility to delete all typos and obsolete tags, it will be strange experience.
Actually I do not knowledgable enough to understand why it is impossible to delete tag in Joplin from database. How it might be impossible to delete something?
So my question was about really deleting tags and showing them independently of notes. It is a new way of assembling tags in Joplin and because of that I wrote it would be difficult. I do not know for what reason someone need to see all tags without possibility to delete them.
My first question was inspired by such apps as Evernote and Anki, where work with tags is much more clear. It is possible to delete tag, keep tag without notes (cards), find all unused tags and delete them... I can wait till this issue will be in high priority for development, or pay for development if it is reasonable sum, or wait till I myself learn programming enough to commit change
I don't know either. As mentioned before, since tags are not tracked in the note history, it shouldn't be an issue. But it is very much possible that I'm missing an edge case or whatnot.
I disagree and strongly believe that people would like to be able to view tags even though there are zero notes attached. A common workflow that Evernote users among GTD users did was to use tags for completing todos and projects. You would likely delete all completed notes which would thus delete the tag in Joplin.
Just confirm, that it's possible. I used DB Browser for SQLite, deleted unused tag, restarted Joplin and all was fine for me. However, I believe that this is not a good idea to tuch a database directly, because it could break the data.
I have slowness problems and my first sync takes a long time. @laurent told me that the slowness surely comes from the large number of tags I have (3729 Tags and 30045 NoteTag):
So I started deleting a few tags (around ten ) then I came across this topic which says that tags are never deleted from the database.
So I ask myself: is there any point in deleting tags? (from a performance point of view, compared to the performance issue mentioned by @laurent)