turns out btw, the tag picker can be used with the modal form/forms plugin
add multiselect and dataview, tick unknown values
name the property tags
in the dataview query box, enter:
[...new Set(dv.pages("").flatMap(p => p.file.tags || []))]
you can sort tags alphabetically:
[...new Set(dv.pages("").flatMap(p => p.file.tags || []))].sort((a, b) => a.localeCompare(b))
sort by frequency (slower):
[...new Set(dv.pages("").flatMap(p => p.file.tags || []))].map(tag => [tag, dv.pages("").flatMap(p => p.file.tags || []).filter(t => t === tag).length]).sort((a, b) => b[1] - a[1]).map(t => t[0])
if you add the second tag, the drop-down menu may not appear (bug?), but keep writing: the tags will appear as if by fuzzy search
you can add your new tags not in the cache as well (if you tick unknown values)
unfortunately, there doesn’t seem to be a way to add default values in the graphical user interface but you can do it in the templater code:
const result = await modalForm.openForm('add_your_form_file', {
values: { ...frontmatter, tags: ["somedefaultvalue"] },