标签未出现在标签下拉菜单中

有些标签显示在标签页面上,但并未出现在标签下拉菜单或搜索中。

Meta 上的一个例子(众多之一)是 #bug::tag。

This is because of site setting max tags in filter list which defaults to 30. The description of the site setting is:

Maximum number of tags to show in the filter dropdown. The most used tags will be shown.

I just increased that setting to 100 here on Meta and #bug::tag is appearing in dropdown now.

If that is the case, this is not a bug @hawk.

what we could do though is making this component make ajax request if filtering doesnt return anything. Or apply filtering on the full list even if we only show a partial list in the first place.

I’d favor this solution: users usually don’t know about the max tags limit, and would expect they search the complete tag set when entering anything into the Search… field.

这是否仍然成立?我们至少应该在底部用 <kbd>更多...</kbd> 或类似内容提示存在更多标签。

@codinghorror 很久以前我就实现过这个:

不过确实,你必须进行过滤才能找到它,而且没有任何提示表明显示列表之外还有更多内容。你仍然想实现 更多… 吗?

是的——我认为应该有一些视觉提示,让用户意识到“啊,这里还有更多内容,不仅仅是可见的项目”……任何容易实现的方案都可以。

再三考虑,我认为我无法实现这一点,至少不能以性能损耗为代价。

如果我们限制显示的标签数量,本质上就是为了避免获取(甚至统计)所有标签。因此,我目前只知道当显示的标签数量少于最大设置值时的情况,但无法判断实际标签总数是否超过了最大显示限制,因为在这种情况下:显示数量 === 最大值。

我常用的一个技巧是:让后端始终返回 max+1 行数据,但只显示 max 行。如果多出来的那一行存在,就说明还有更多数据。

很棒的技巧,谢谢!:+1:

这就应该可以了:

那是……一个奇怪的老把戏™