Put the new item preview in a Turbo frame

Nice, gotta say, this is a pretty neat way of making things feel more
app-y! There's some missing pieces here about like, loading state etc,
but the vibes are pretty good, and the implementation was dead-easy!
This commit is contained in:
Emi Matchu 2024-07-01 13:48:20 -07:00 committed by Matchu
parent 1b000189c4
commit 054c809052

View file

@ -13,13 +13,14 @@
how we handle zones. Until then, these items will be <em>very</em> buggy,
sorry!
%outfit-viewer
= turbo_frame_tag "item-preview" do
%outfit-viewer
%outfit-pet-appearance
= outfit_viewer_layers @pet_layers
%outfit-item-appearance
= outfit_viewer_layers @item_layers
= form_for item_path(@item), method: :get, class: "species-color-picker",
= form_for item_path(@item), method: :get, class: "species-color-picker",
data: {"is-valid": @preview_error.nil?} do |f|
- if @preview_error == :pet_type_does_not_exist
%span.error-icon{title: "We haven't seen this kind of pet before."} ⚠️