From 107494d5aa2e5d90b104e1e539af0b683d1d6ea6 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Mon, 18 Nov 2024 17:18:03 -0600 Subject: [PATCH] Restore behavior: clicking tags filters by that tag --- app/views/bubbles/_tags.html.erb | 4 +++- app/views/bubbles/list/_bubble.html.erb | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/bubbles/_tags.html.erb b/app/views/bubbles/_tags.html.erb index f802d3d8f..57e17a8f2 100644 --- a/app/views/bubbles/_tags.html.erb +++ b/app/views/bubbles/_tags.html.erb @@ -1,3 +1,5 @@ +<% @filter ||= Current.user.filters.last %> + <% bubble.tags.last(3).each do |tag| %> - <%= link_to tag.hashtag, bubbles_path(bucket_id: bubble.bucket, tag_ids: tag), class: "bubble__bubble bubble__meta bubble__tag" %> + <%= link_to tag.hashtag, bubbles_path(@filter.to_params.merge(tag_ids: [ tag.id ])), class: "bubble__bubble bubble__meta bubble__tag" %> <% end %> diff --git a/app/views/bubbles/list/_bubble.html.erb b/app/views/bubbles/list/_bubble.html.erb index 1d822e861..b87ca2773 100644 --- a/app/views/bubbles/list/_bubble.html.erb +++ b/app/views/bubbles/list/_bubble.html.erb @@ -20,10 +20,8 @@ <% bubble.tags.each do |tag| %> - <%= button_tag tag.hashtag, type: :button, - class: "btn btn--plain", style: "color: #{bubble.color}", data: { - controller: "query-merger", action: "query-merger#merge", - query_merger_key_param: "tag_ids", query_merger_value_param: tag.id } %> + <%= link_to tag.hashtag, bubbles_path(@filter.to_params.merge(tag_ids: [ tag.id ])), + class: "btn btn--plain", style: "color: #{bubble.color}" %> <% end %> <%= tag.time bubble.created_at, class: "txt-nowrap flex-item-justify-end" do %>