From 955aeb984e0951dff1de31f87ba2fc562c849653 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Fri, 26 Dec 2025 22:43:17 -0800 Subject: [PATCH] [WV2] Simplify item search layout --- app/views/wardrobe/show.html.haml | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/views/wardrobe/show.html.haml b/app/views/wardrobe/show.html.haml index d7fd50fb..c7b77cf9 100644 --- a/app/views/wardrobe/show.html.haml +++ b/app/views/wardrobe/show.html.haml @@ -85,8 +85,6 @@ = submit_tag "Change pose", name: nil, class: "pose-submit-button" .outfit-controls-section - %h1 Customize your pet - = form_with url: wardrobe_v2_path, method: :get, class: "item-search-form" do |f| = outfit_state_params = f.text_field "q[name]", placeholder: "Search for items...", value: params.dig(:q, :name), "aria-label": "Search for items" @@ -94,21 +92,23 @@ - if @search_mode = render "search_results" - - elsif @outfit.worn_items.any? - .worn-items - - outfit_items_by_zone(@outfit).each do |zone_group| - .zone-group - %h3.zone-label= zone_group[:zone_label] - %ul.items-list - - zone_group[:items].each do |item| - %li.item-card - .item-thumbnail - = image_tag item.thumbnail_url, alt: item.name, loading: "lazy" - .item-info - .item-name= item.name - .item-badges - = render "items/badges/kind", item: item - = render "items/badges/first_seen", item: item - = button_to wardrobe_v2_path, method: :get, class: "item-remove-button", title: "Remove #{item.name}", "aria-label": "Remove #{item.name}" do - ❌ - = outfit_state_params @outfit.without_item(item) + - else + %h1 Untitled outfit + - if @outfit.worn_items.any? + .worn-items + - outfit_items_by_zone(@outfit).each do |zone_group| + .zone-group + %h3.zone-label= zone_group[:zone_label] + %ul.items-list + - zone_group[:items].each do |item| + %li.item-card + .item-thumbnail + = image_tag item.thumbnail_url, alt: item.name, loading: "lazy" + .item-info + .item-name= item.name + .item-badges + = render "items/badges/kind", item: item + = render "items/badges/first_seen", item: item + = button_to wardrobe_v2_path, method: :get, class: "item-remove-button", title: "Remove #{item.name}", "aria-label": "Remove #{item.name}" do + ❌ + = outfit_state_params @outfit.without_item(item)