From b7bbd1ace317c4e62bd3b86dfee198618891dc12 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Thu, 5 Feb 2026 18:11:01 -0800 Subject: [PATCH] [WV2] Simplify pose vs style picking Rather than surface the fact that pose and style are independent values, in this change we treat them as basically mutually exclusive appearance options. If there's no alt style selected, a pose option is visibly selected instead. If there's an alt style selected, no pose option is visibly selected (even though the data model contains one), and selecting one removes the alt style. --- app/views/wardrobe/_pose_picker_form.html.haml | 14 +++++++------- app/views/wardrobe/_style_picker_form.html.haml | 4 ---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/app/views/wardrobe/_pose_picker_form.html.haml b/app/views/wardrobe/_pose_picker_form.html.haml index a3c7e51a..8643ca8e 100644 --- a/app/views/wardrobe/_pose_picker_form.html.haml +++ b/app/views/wardrobe/_pose_picker_form.html.haml @@ -1,5 +1,5 @@ = form_with url: wardrobe_v2_path, method: :get, class: "pose-picker-form" do |f| - = outfit_state_params except: [:pose] + = outfit_state_params except: [:pose, :style] %table.pose-picker-table %thead %tr @@ -15,18 +15,18 @@ %th %span.emoji-icon{title: "Masculine"} 💁‍♂️ %td - = render "pose_option", pose: "HAPPY_MASC", pet_state: @available_poses["HAPPY_MASC"], selected: @selected_pose == "HAPPY_MASC" + = render "pose_option", pose: "HAPPY_MASC", pet_state: @available_poses["HAPPY_MASC"], selected: !@alt_style && @selected_pose == "HAPPY_MASC" %td - = render "pose_option", pose: "SAD_MASC", pet_state: @available_poses["SAD_MASC"], selected: @selected_pose == "SAD_MASC" + = render "pose_option", pose: "SAD_MASC", pet_state: @available_poses["SAD_MASC"], selected: !@alt_style && @selected_pose == "SAD_MASC" %td - = render "pose_option", pose: "SICK_MASC", pet_state: @available_poses["SICK_MASC"], selected: @selected_pose == "SICK_MASC" + = render "pose_option", pose: "SICK_MASC", pet_state: @available_poses["SICK_MASC"], selected: !@alt_style && @selected_pose == "SICK_MASC" %tr %th %span.emoji-icon{title: "Feminine"} 💁‍♀️ %td - = render "pose_option", pose: "HAPPY_FEM", pet_state: @available_poses["HAPPY_FEM"], selected: @selected_pose == "HAPPY_FEM" + = render "pose_option", pose: "HAPPY_FEM", pet_state: @available_poses["HAPPY_FEM"], selected: !@alt_style && @selected_pose == "HAPPY_FEM" %td - = render "pose_option", pose: "SAD_FEM", pet_state: @available_poses["SAD_FEM"], selected: @selected_pose == "SAD_FEM" + = render "pose_option", pose: "SAD_FEM", pet_state: @available_poses["SAD_FEM"], selected: !@alt_style && @selected_pose == "SAD_FEM" %td - = render "pose_option", pose: "SICK_FEM", pet_state: @available_poses["SICK_FEM"], selected: @selected_pose == "SICK_FEM" + = render "pose_option", pose: "SICK_FEM", pet_state: @available_poses["SICK_FEM"], selected: !@alt_style && @selected_pose == "SICK_FEM" = submit_tag "Change pose", name: nil, class: "pose-submit-button" diff --git a/app/views/wardrobe/_style_picker_form.html.haml b/app/views/wardrobe/_style_picker_form.html.haml index be448bbc..9214f15d 100644 --- a/app/views/wardrobe/_style_picker_form.html.haml +++ b/app/views/wardrobe/_style_picker_form.html.haml @@ -1,10 +1,6 @@ = form_with url: wardrobe_v2_path, method: :get, class: "style-picker-form" do |f| = outfit_state_params except: [:style] .style-picker-list - %label.style-option - = radio_button_tag :style, "", @alt_style.nil? - .style-option-content - %span.style-option-name Default - @available_alt_styles.each do |alt_style| %label.style-option = radio_button_tag :style, alt_style.id, @alt_style&.id == alt_style.id