diff --git a/config/test.exs b/config/test.exs index 0b59e37..de5e123 100644 --- a/config/test.exs +++ b/config/test.exs @@ -21,7 +21,7 @@ config :app, AppWeb.Endpoint, server: false # Print only warnings and errors during test -config :logger, level: :warn +config :logger, level: :warning # Initialize plugs at runtime for faster test compilation config :phoenix, :plug_init_mode, :runtime diff --git a/lib/app_web.ex b/lib/app_web.ex index e801cec..3ebe468 100644 --- a/lib/app_web.ex +++ b/lib/app_web.ex @@ -86,7 +86,9 @@ defmodule AppWeb do defp view_helpers do quote do # Use all HTML functionality (forms, tags, etc) - use Phoenix.HTML + import Phoenix.HTML + import Phoenix.HTML.Form + use PhoenixHTMLHelpers # Import LiveView and .heex helpers (live_render, live_patch, <.form>, etc) import Phoenix.LiveView.Helpers diff --git a/lib/app_web/live/live_helpers.ex b/lib/app_web/live/live_helpers.ex index 1896fcb..5c9fc95 100644 --- a/lib/app_web/live/live_helpers.ex +++ b/lib/app_web/live/live_helpers.ex @@ -1,6 +1,6 @@ defmodule AppWeb.LiveHelpers do - import Phoenix.LiveView - import Phoenix.LiveView.Helpers + # import Phoenix.LiveView + # import Phoenix.LiveView.Helpers import Phoenix.Component alias Phoenix.LiveView.JS @@ -36,15 +36,6 @@ defmodule AppWeb.LiveHelpers do phx-window-keydown={JS.dispatch("click", to: "#close")} phx-key="escape" > - <%= if @return_to do %> - <%= live_patch("✖", - to: @return_to, - id: "close", - class: "phx-modal-close", - phx_click: hide_modal() - ) %> - <% end %> - <%= render_slot(@inner_block) %> diff --git a/lib/app_web/templates/layout/root.html.heex b/lib/app_web/templates/layout/root.html.heex index 3ea563a..da6ab06 100644 --- a/lib/app_web/templates/layout/root.html.heex +++ b/lib/app_web/templates/layout/root.html.heex @@ -8,7 +8,9 @@ - <%= live_title_tag(assigns[:page_title] || "Alpine.js Demo", suffix: " · PETAL Stack") %> + <.live_title suffix=" · PETAL Stack"> + <%= assigns[:page_title] || "Alpine.js Demo" %> +