Still a little odd that it's a separate form but this conceptually belongs here

This commit is contained in:
Jason Zimdars
2024-11-19 10:31:53 -06:00
parent 73391a2a4e
commit 492360a259
2 changed files with 16 additions and 11 deletions
+16 -1
View File
@@ -65,7 +65,22 @@
</form>
</div>
<%= form_with url: bubbles_path, id: :filter_form, method: :get, class: "flex flex-column gap full-width margin-block-start", style: "--border-color: var(--color-subtle)" do %>
<div class="pad fill-shade border-radius margin-block-end">
<%= form_tag bubbles_path, class: "flex align-center gap input input--actor txt-small fill-white border-radius", method: :get do %>
<% @filter.to_params.each do |key, value| %>
<%= filter_hidden_field_tag key, value %>
<% end %>
<%= search_field_tag "terms[]", nil, class: "input full-width", placeholder: "By keyword…", id: nil %>
<button class="btn">
<span class="for-screen-reader">Apply</span>
<%= image_tag "arrow-right.svg", aria: { hidden: true }, size: 24 %>
</button>
<% end %>
</div>
<%= form_with url: bubbles_path, id: :filter_form, method: :get, class: "flex flex-column gap full-width", style: "--border-color: var(--color-subtle)" do %>
<% Array(params[:terms]).each do |term| %>
<%= hidden_field_tag "terms[]", term, id: nil %>
<% end %>
-10
View File
@@ -31,16 +31,6 @@
</section>
<section class="bubbles-list unpad-inline center margin-block-start">
<header class="flex-inline align-center gap txt-small margin-block-end-half center">
<%= form_tag bubbles_path, method: :get do %>
<% @filter.to_params.each do |key, value| %>
<%= filter_hidden_field_tag key, value %>
<% end %>
<%= search_field_tag "terms[]", nil, class: "input center flex-inline", placeholder: "Type to filter…", id: nil %>
<% end %>
</header>
<ul class="unpad margin-none flex flex-column txt-align-start center">
<%= render partial: "bubbles/list/bubble", collection: @bubbles, cached: true %>
</ul>