Display tag counts in the filter menu

- Provides a little information scent
- Prevents being surprised by "no results"
This commit is contained in:
Jason Zimdars
2025-07-08 15:57:29 -05:00
parent ed83654aaf
commit 27285a3dcb
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -13,4 +13,8 @@ class Tag < ApplicationRecord
def hashtag
"#" + title
end
def cards_count
cards.count
end
end
+1 -1
View File
@@ -1,7 +1,7 @@
<li class="popup__group flex align-center" data-filter-target="item" data-navigable-list-target="item">
<%= icon_tag "tag" %>
<%= link_to cards_path(tag_ids: [ tag ]), class: "btn popup__item min-width flex-item-grow" do %>
<span class="overflow-ellipsis"><%= tag.title %></span>
<span class="overflow-ellipsis"><%= tag.title %> (<%= tag.cards_count %>)</span>
<span class="translucent flex-item-no-shrink flex-item-justify-end"> </span>
<% end %>
</li>