Tags are really useful both for categorizing things in a way meant to be visible (like blog post categories) and meant primarily for branches in display code (like "featured").
It's been an annoyance on several projects now to content authors that tags used anywhere in the repository are all suggested when tagging a document. My current client just brought this up to me in a discussion and called it a "limitation of Prismic". I have to agree -- anything which makes the content author's time more confusing and annoying is a problem.
I don't know what the best solution would be but one suggestion is this:
Detect tag names which start with a string and then some separator string. If the string before the separator matches a document type name, and the current document is not of that type, do not offer it in the list of tag suggestions.
Example: if I have a document type Author which has some metadata tagging only relevant to Author documents, I can use tags like Author::Guest
. On blog posts I can have tags for categories like Post::News
and Post::Musings
and the Author::Guest
suggestion won't come up at all. I could use a tag Featured
on either, and it'd come up as a suggestion on either.
Of course on my end, in my website code, I then snip out those prefixes before display.
It occurs to me that this wouldn't add any complexity to Prismic itself -- no need to stop the user from manually typing a namespaced tag to the wrong document type if they really need to -- and I think that'd mean this is just a tweak on the UI side, not really any changes under the hood necessary.