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.
11 lines
590 B
Text
11 lines
590 B
Text
= form_with url: wardrobe_v2_path, method: :get, class: "style-picker-form" do |f|
|
|
= outfit_state_params except: [:style]
|
|
.style-picker-list
|
|
- @available_alt_styles.each do |alt_style|
|
|
%label.style-option
|
|
= radio_button_tag :style, alt_style.id, @alt_style&.id == alt_style.id
|
|
.style-option-content
|
|
.style-option-thumbnail
|
|
%img{src: alt_style.thumbnail_url, alt: "", width: 40, height: 40, loading: "lazy"}
|
|
%span.style-option-name= alt_style.adjective_name
|
|
= submit_tag "Change style", name: nil, class: "style-submit-button"
|