From 75daebf1d4b284dd021f69149c5410b0bde3d4cb Mon Sep 17 00:00:00 2001 From: Bjorn Forsberg Date: Fri, 1 Dec 2023 14:18:12 +0100 Subject: [PATCH] WIP: Remove turbo_frames now morphing handles it automatically --- app/views/metrics/_filter.html.erb | 2 +- app/views/metrics/_forecasts_form.html.erb | 4 +--- app/views/metrics/_tile.html.erb | 4 ---- app/views/metrics/show.html.erb | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/views/metrics/_filter.html.erb b/app/views/metrics/_filter.html.erb index 336a1d4..645e5a7 100644 --- a/app/views/metrics/_filter.html.erb +++ b/app/views/metrics/_filter.html.erb @@ -1,7 +1,7 @@ <%= form_tag( url_for(action: action_name, charge_type: filter.charge_type), method: :get, - data: {controller: "filters", turbo_frame: :metrics, turbo_action: :advance}, + data: {controller: "filters"}, ) do %> <%= hidden_field_tag :chart, filter.chart %> diff --git a/app/views/metrics/_forecasts_form.html.erb b/app/views/metrics/_forecasts_form.html.erb index f877548..5bc434c 100644 --- a/app/views/metrics/_forecasts_form.html.erb +++ b/app/views/metrics/_forecasts_form.html.erb @@ -5,9 +5,7 @@ data: { controller: "submittable", submittable_target: "form", - action: "change->submittable#submit", - turbo_frame: :metrics, - turbo_action: :advance + action: "change->submittable#submit" } ) do |form| %> diff --git a/app/views/metrics/_tile.html.erb b/app/views/metrics/_tile.html.erb index 6ccbf8e..796f237 100644 --- a/app/views/metrics/_tile.html.erb +++ b/app/views/metrics/_tile.html.erb @@ -5,10 +5,6 @@ content: polaris_icon(name: "ViewMinor", color: :subdued), title: "View chart", url: url_for(action: action_name, **filter.to_param.merge(chart: tile.handle)), - data: { - turbo_frame: "metrics", - turbo_action: "advance", - }, }] ) do %> <%= polaris_stack(alignment: :center) do |stack| %> diff --git a/app/views/metrics/show.html.erb b/app/views/metrics/show.html.erb index b6b2a0d..7d55f2e 100644 --- a/app/views/metrics/show.html.erb +++ b/app/views/metrics/show.html.erb @@ -5,7 +5,7 @@ <%= render "shared/page_actions", page: page %> - <%= turbo_frame_tag :metrics, data: { controller: "loading" } do %> + <%= tag.div data: { controller: "loading" } do %> <%= polaris_vertical_stack(gap: "6") do %>