umm, dont want to be rude here, but modals totally suck and the Phoenix LiveView generators use them as standard.
How do I convert a modal to an in-page form?
<.modal :if={@live_action in [:new, :edit]} id="chat-modal" show on_cancel={JS.patch(~p"/chats")}>
<.live_component
module={FolkbotWeb.ChatLive.FormComponent}
id={@chat.id || :new}
title={@page_title}
action={@live_action}
chat={@chat}
patch={~p"/chats"}
/>
</.modal>
I am being pretty naive by trying to simply swap but its not working
<.form :if={@live_action in [:new, :edit]} id="chat-modal" show on_cancel={JS.patch(~p"/chats")}>
<.live_component
module={FolkbotWeb.ChatLive.FormComponent}
id={@chat.id || :new}
title={@page_title}
action={@live_action}
chat={@chat}
patch={~p"/chats"}
/>
</.form>
sends to url
for a balanced data driven Modal UX discussion