Tag "Search or create" text is displayed when a category has restricted tags

Tested locally on the latest version of Discourse. Related to this post: What about an "advanced" or "guided" submission process for new topics in certain categories - #7 by simon.

When a category is configured to only allow specific tags or tag groups to be used, the “search or create” input is incorrectly displayed. If a user then enters the name of an existing tag that is not allowed in the category into the input, they will get the “no matches found” response. If the user has permissions to create new tags on the site and they enter a new tag into the “search or create” input, they will be given the option to create the new tag. An error message saying that the tag isn’t allowed in the category will be returned when they attempt to create the topic.

Here’s an example that should only allow users to select tags from the products tag group:

Ideally, for the above case, instead of displaying the “search or create” input, users would be shown something like what they get when tags from a tag group are required:

If a category’s tags are restricted, maybe all tags that are available in the category need to be displayed. Discourse will display all allowed tags by adding a scrollbar to the tag dropdown if a tag group is added to the “Require new topics to have tags from tag groups” setting, but not if the tag group is just added to the restricted tags setting:

As opposed to when the features tag group is just added to the restricted tag groups setting. In this case, there’s no way for users to know about the feature-f, feature-g, etc tags:

No scroll bar is displayed, despite there being 15 tags in the tag group:


@simon maybe this solves one of your issues where the tags selector isn’t scrolling but limited to showing 5 tags…