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:
parent
1b000189c4
commit
054c809052
1 changed files with 19 additions and 18 deletions
|
@ -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."} ⚠️
|
||||
|
|
Loading…
Reference in a new issue