ron_jeremy However, this issue is trivial so please just ignore or nuke this thread.
Now now, let's not be so hasty. I think you're definitely onto something here.
jordanjay29 I don't think it's actually wrong. Your users can still select secondary tags if you had them, they simply aren't required to. A setting of 0 disables the requirement, and doesn't prohibit the tag group.
That's what the description implies, but it appears to be inaccurate. If you set the minimum and maximum values for secondary tags as ron_jeremy has described, the user can't select any secondary tags. Flarum doesn't show any existing secondaries in the Choose Tags dialog, and won't acknowledge them if you type them in manually.
I think @Toby did it that way because it was expedient, on the assumption that most forums are likely to have more secondary tags than primaries. That's reasonable, but can be a bit inconvenient in some cases. Perhaps a couple of small changes would make tag creation less confusing and more efficient:
- First, adjust the wording of the descriptions in the Tags extension Settings modal to avoid confusion.
- Add a "Create tag as: primary | secondary" dropdown setting to the Create Tag dialog.
- If the maximum for one of those two types is set to 0, have the dropdown default to the other type.
@ron_jeremy Does this sound like it would work better for you?
... And there's another small issue that could be handled better. Setting the maximum to 0 for both tag types will prevent users from assigning any tags to discussions: Flarum just displays an empty Choose Tags dialog that you can't do anything with. That's a bit odd, but not really an error. But it would also make it impossible for Flarum to settle on a default type for new tags in the Create Tag dialog. This would require some sort of handling.
It would be possible to fix both these problems by adding a fourth small change, which could be either:
- When the admin saves the Tags extension Settings modal, check whether the maximum for both types has been set to 0. If this is the case, warn the admin that this will interfere with tag creation and selection, and require the admin to set the maximum for at least one type to a number greater than 0.
Or:
- Add a default default value for the dropdown; e.g. if the maximum is set to 0 for both types, then use secondary as the default "Create tag as" setting in the Create Tag dialog.
The former method is good for hand-holding admins who may not realize that setting both maximum values to 0 will render the Tags extension pretty much useless. The latter method will accommodate admins who want to be able to create tags but don't want to allow the assignment of tags to discussions for some reason.
If @Toby likes the idea I'll make it an issue for consideration during the impending Tags overhaul.