Closed jordanjay29 closed 4 years ago
Currently only primary tags are supported in the options. Was this a workaround to prevent people having this issue or is it now intended? @imorland
It's a slightly more elegant workaround until https://github.com/flarum/core/issues/2138 is implemented
Would it be worth allowing secondary tags to be chosen, and then automatically add the required primary tag when creating the PD?
I was thinking something like this:
would become...
if (tag.data.attributes.isChild) {
// This is a secondary tag! We also need the primary! :)
const parentTagId = tag.data.relationships.parent.data.id;
const parentTag = app.store.getBy("tags", "id", parentTagId);
this.tags = [parentTag, tag];
} else {
this.tags = [tag];
}
Possibily yes. Remember this would only be for the front end.
Something similar would be required here too: https://github.com/FriendsOfFlarum/byobu/blob/9dec307ea855f62be48a4888a18ccbd3b9100014/src/Listeners/CheckTags.php#L56
When Byobu settings force all new PDs to a selected tag slug, that tag slug must be 100% compatible with the current Tag settings. This removes the ability for PDs to be put in tags that do not obey the traditional structure if desired.
For example: Flarum's default Tag settings require 1 Primary tag and 0-3 Secondary tags.
If Byobu's forced tag slug is set to a Secondary tag, no further PDs can open.
Byobu either needs the ability to sidestep the Tag settings, or ideally, to allow multiple tag slugs to be used when opening a new PD to make them compatible with Tag settings.