Phoenix 1.7.0-rc.0 is out!

Actually, I got it working. I must have made a typo.

1 Like

I understand the mechanics of CSS, but still can’t build anything decent looking.
With tailwind I feel like a first-rate artist.

And now I’ll mix archive.install hex phx_new 1.7.0-rc.0 … release notes look very promising.
Thanks for the work, Phoenix team.



All HTML rendering is then based on function components, which can be written directly in a module, or embedded from an external file with the new embed_templates macro provided by Phoenix.Component.

I am really looking forward to this one. I am using htmx these days and they have a nice essay on locality of behavior. This new feature helps in achieving that.

Great work as always and heartfelt thanks.


Bandit looks sweet. GitHub - mtrudel/bandit: Bandit is a pure Elixir HTTP server for Plug & WebSock applications


I was just going to ask about this.

Thanks to work by Mat Trudel, we now have the basis for first-class webserver support in Plug and Phoenix, allowing other webservers like Bandit to be swapped in Phoenix while enjoying all features like WebSockets, Channels, and LiveView.

Did anyone else start using Bandit?

Also, did anyone create a Core Component replacement design already?!?

We love what the Tailwind team designed for new applications, but we also can’t wait to see the community release their own drop-in replacements for core_components.ex for various frameworks of choice.


I tried it, it’s awesome.

I couldn’t make it work with Phoenix 1.6, however now it works flawlessly with Phoenix 1.7.

Here everyone, if you are not familiar with Bandit, checkout a talk from Elixir Conf 2021:

ElixirConf 2021 - Mat Trudel - bandit on the loose! Networking in Elixir demystified


Guys, as you might have read, we can just change the design present in the core_components.ex file and every generated page will inherit the design.

So I had a question, is anyone using the generated pages without deleting them? For instance as Admin pages??

I was thinking it’s a waste of good code, and associated tests that get generated!!

For instance by using:

mix Photos Photo photos --web Admin

Which would generate the LiveViews in lib/app_web/live/admin/photo_live/ , namespaced AppWeb.Admin.PhotoLive instead of AppWeb.PhotoLive .

I was looking for a way to salvage generated code and not need another library or generator to generated it for me.

I even asked @chrismccord if there was a nob or flag we can set to satisfy this need. :sweat_smile:


Not sure if this was raised before, but I’m wondering about form input components. On the one hand, LiveView ships with a form component. On the other hand, the Phoenix generators now generate styled input components.

How about shipping an unstyled <.input /> component with LiveView? Basically cover the functionality of Phoenix.HTML.Form.

Does that make sense or is it something that the team specifically decided not to do?

1 Like

Contrary to Phoenix.HTML.Form core_components.ex is completely userland. Adjust as needed. Copy from project to project. Whatever gets the job done.

1 Like

Thanks to everyone who contributed to 1.7!

I am having the following issue:

(Phoenix.Router.NoRouteError) no route found for GET /az/book/brief (PrjWeb.Router)
even though the list of available routes does contain
survey_path GET /az/book/brief PrjWeb.SurveyController :brief

I have not made any route changes since 1.6. The only notable thing about this and similar routes (none working under 1.7) is that they are all generated using a macro, a simplified version of which could be:

defmacro survey(path) do
  quote do
    get unquote(path <> "/brief"), SurveyController, :brief

Is this a bug or am I missing something?

1 Like

Great to hear it’s working well!

Bandit should support any version of Phoenix prior to 1.7, but without support for WebSocket connections.

The big change in 1.7 that enables WebSocket support in servers other than Cowboy was the replacement of Phoenix’s Cowboy-specific WebSocket plumbing in 1.6 and earlier with a generic WebSocket interface named WebSock (you can think of it as ‘Plug for WebSockets’, basically).


It also worked well during my testing of 1.7. Thanks for your great work! There are a few points that could inform and facilitate the switch to Bandit (I hope that I understand them correctly):

  1. Like Cowboy, config :prj, Endpoint, http[s] is where the Bandit config options go.
  2. Unlike Cowboy, any IP address other than must be set/bound explicitly.
  3. Bandit does not support on-the-fly gzip compression (reverse proxy to the rescue).

References to the above could help improve the “Using Bandit With Phoenix” documentation section, as would a prominent link to the Bandit.PhoenixAdapter page.


Not sure I’m a great fan of the copying approach - why not pull the unstyled components into Phoenix itself? There’s a reason why Phoenix.HTML exists, right? For example, supports customizable prompts:

select(form, :role, ["Admin": "admin", "User": "user"], prompt: [key: "Choose your role", disabled: true])

But the new generated <.input type="select"> component only supports a string prompt.


Afaik the components are meant to eventually replace Phoenix.HTML.


:raised_hand: Me! Tailwind was a game changer for me. Would love to learn more about it.


Fantastic news - I’ve been waiting for this to start a new project.

I did find a typo in the docs - in Request Lifecycle > A new view:

   embed_templates "hello/*"

should be

 embed_templates "hello_html/*"

Happy to raise a “issue” but wasn’t sure where.


Noted! I’ll add this to the moduledoc of Bandit.PhoenixAdapter and link off the README / top-level ex_doc.

Also noted, and will change in the next release of Bandit (this default only applied to PhoenixAdapter; Bandit itself defaults to

This is coming in the 0.7 release train later this year!

Thanks for the feedback!


Issues have been resolved in Bandit 0.6.0, just released a moment ago.


Is anyone else having problems with a dead view web page not automatically reloading. I can see my changes being recompiled but the browser doesn’t automatically get refreshed.

Tried it with a Live View and it works fine - just seems to be a problem with views from a controller.

1 Like

In case updated your Mac and Phoenix, I faced the same issue:

Try: mix deps.compile file_system (So your live reload will work!)

1 Like