Repository: phoenixframework/phoenix
Pull request #4963 (2022-09-21 16:20:13)

Fix typo


Patch:
diff --git a/guides/howto/custom_error_pages.md b/guides/howto/custom_error_pages.md
index 17f83edc2..0448942ee 100644
--- a/guides/howto/custom_error_pages.md
+++ b/guides/howto/custom_error_pages.md
@@ -68,8 +68,7 @@ Phoenix generates an `ErrorView` for us, but it doesn't give us a `lib/hello_web
 <html lang="en">
   <head>
     <meta charset="utf-8"/>
-    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
-    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1"/>
     <title>Welcome to Phoenix!</title>
     <link rel="stylesheet" href="/css/app.css"/>
     <script defer type="text/javascript" src="/js/app.js"></script>
diff --git a/installer/templates/phx_single/lib/app_name_web.ex b/installer/templates/phx_single/lib/app_name_web.ex
index ec62af0f1..99fcc17f0 100644
--- a/installer/templates/phx_single/lib/app_name_web.ex
+++ b/installer/templates/phx_single/lib/app_name_web.ex
@@ -34,10 +34,10 @@ defmodule <%= @web_namespace %> do
     quote do
       use Phoenix.View,
         root: "lib/<%= @lib_web_name %>/templates",
-        namespace: <%= @web_namespace %>
+        namespace: <%= @web_namespace %><%= if @html do %>
 
       use Phoenix.Component
-
+<% end %>
       # Import convenience functions from controllers
       import Phoenix.Controller,
         only: [get_csrf_token: 0, view_module: 1, view_template: 1]
@@ -60,14 +60,6 @@ defmodule <%= @web_namespace %> do
     quote do
       use Phoenix.LiveComponent
 
-      unquote(view_helpers())
-    end
-  end
-
-  def component do
-    quote do
-      use Phoenix.Component
-
       unquote(view_helpers())
     end
   end<% end %>
diff --git a/installer/templates/phx_umbrella/apps/app_name_web/lib/app_name.ex b/installer/templates/phx_umbrella/apps/app_name_web/lib/app_name.ex
index f7e2bf71a..a93c55c46 100644
--- a/installer/templates/phx_umbrella/apps/app_name_web/lib/app_name.ex
+++ b/installer/templates/phx_umbrella/apps/app_name_web/lib/app_name.ex
@@ -34,10 +34,10 @@ defmodule <%= @web_namespace %> do
     quote do
       use Phoenix.View,
         root: "lib/<%= @lib_web_name %>/templates",
-        namespace: <%= @web_namespace %>
+        namespace: <%= @web_namespace %><%= if @html do %>
 
       use Phoenix.Component
-
+<% end %>
       # Import convenience functions from controllers
       import Phoenix.Controller,
         only: [get_csrf_token: 0, view_module: 1, view_template: 1]
@@ -60,14 +60,6 @@ defmodule <%= @web_namespace %> do
     quote do
       use Phoenix.LiveComponent
 
-      unquote(view_helpers())
-    end
-  end
-
-  def component do
-    quote do
-      use Phoenix.Component
-
       unquote(view_helpers())
     end
   end<% end %>
diff --git a/installer/templates/phx_web/templates/layout/app.html.heex b/installer/templates/phx_web/templates/layout/app.html.heex
index 9d5f4fa18..7b16345d9 100644
--- a/installer/templates/phx_web/templates/layout/app.html.heex
+++ b/installer/templates/phx_web/templates/layout/app.html.heex
@@ -24,7 +24,7 @@
         href="https://github.com/phoenixframework/phoenix"
         class="text-[0.8125rem] font-semibold leading-6 text-zinc-900 hover:text-zinc-700"
       >
-        GithHub
+        GitHub
       </a>
       <a
         href="https://hexdocs.pm/phoenix/overview.html"
diff --git a/installer/templates/phx_web/templates/layout/root.html.heex b/installer/templates/phx_web/templates/layout/root.html.heex
index 803ee5a1e..28909b57b 100644
--- a/installer/templates/phx_web/templates/layout/root.html.heex
+++ b/installer/templates/phx_web/templates/layout/root.html.heex
@@ -2,8 +2,7 @@
 <html lang="en">
   <head>
     <meta charset="utf-8"/>
-    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
-    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1"/>
     <meta name="csrf-token" content={get_csrf_token()}>
     <.live_title suffix=" · Phoenix Framework"><%%= assigns[:page_title] || "<%= @app_module %>" %></.live_title>
     <link phx-track-static rel="stylesheet" href={~p"/assets/app.css"}/>


Test patch:
diff --git a/installer/test/phx_new_umbrella_test.exs b/installer/test/phx_new_umbrella_test.exs
index e18581f8b..5f704dc65 100644
--- a/installer/test/phx_new_umbrella_test.exs
+++ b/installer/test/phx_new_umbrella_test.exs
@@ -255,7 +255,6 @@ defmodule Mix.Tasks.Phx.New.UmbrellaTest do
       end
 
       assert_file web_path(@app, "lib/#{@app}_web.ex"), fn file ->
-        assert file =~ "import Phoenix.LiveView.Helpers"
         assert file =~ "def live_view do"
         assert file =~ "def live_component do"
       end