タグドロップダウンにタグが表示されない

tags page には表示されているタグが、タグのドロップダウンリストや検索には表示されていない問題があります。

Meta サイトの例(多数あるうちの一例)として、bug があります。

「いいね!」 6

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.

「いいね!」 5

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

「いいね!」 1

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.

「いいね!」 5

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〉more …〈/kbd〉や同様の表現で、他のタグの存在を示唆すべきです。

「いいね!」 2

@codinghorror 以前にこれを実装しました:

ただし、検索するにはフィルタリングが必要であり、表示されているリスト以外にもっとあることを示すヒントは何もないのも事実です。それでも <kbd>more...</kbd> を実装したいとお考えですか?

「いいね!」 2

はい——「あ、ここには目に見えるアイテム以外にもっと何かあるんだな」という視覚的なヒントが何らかの形で必要だと思います。……簡単なもので構いません。

「いいね!」 3

改めて考え直しましたが、パフォーマンスへの影響を避けつつこれを達成するのは難しいと思います。

表示するタグを制限するのは、すべてのタグを取得(あるいはカウント)する必要を避けるためです。そのため、私が把握できるのは「表示されているタグ数が最大設定値未満かどうか」だけです。一方、タグ数が最大表示数を超えるかどうかは判断できません。なぜなら、その場合「表示数 === 最大値」となってしまうからです。

「いいね!」 1

私がよく使うテクニックとして、バックエンドには常に max+1 件の行を返させ、実際には max 件だけ表示する方法があります。+1 件のデータが存在すれば、さらにデータがあることになります。

「いいね!」 6

すごいテクニック、ありがとう :+1:

これで解決するはずです:

「いいね!」 2

それは…奇妙な古い手口™です。

「いいね!」 1