$ the-wire · showcase
LiveViewTest keyed-move crash fixed, SVG portals get their namespace
By RepoJournal · Filed · About Elixir & Phoenix · Composed from the cited sources · methodology
Phoenix LiveView's test harness no longer explodes on keyed entries that move and change in the same render, and namespaced portal targets now render instead of vanishing into an HTMLUnknownElement.
Resolve templates in moved keyed entries in LiveViewTest (#4440) phoenixframework/phoenix_live_view
A keyed comprehension entry that moves and changes in the same render is encoded as [old_pos, diff], and resolve_templates/2 only walked maps, so a shared template referenced inside that diff stayed an integer and rendering the merged tree raised BadMapError in Phoenix.LiveView.Diff.template_static/2. The fix makes resolve_templates/2 descend into that positional form, so tests covering reorder...
Preserve namespace for portal targets phoenixframework/phoenix_live_view
When a phx-portal template's root is namespaced, such as svg or MathML, the target was created as an HTMLUnknownElement with the SVG children attached under a non-SVG root, so the content never displayed. The portal target is now created with createElementNS(namespaceURI, ...), which restores rendering for namespaced portals.
Resolve templates in moved keyed entries in LiveViewTest phoenixframework/phoenix_live_view
The same moved-keyed-entry failure has a reproduction in the PR: an :for with :key that reorders items and toggles an :if badge in one handle_event, over a shared template.
Update assets phoenixframework/phoenix_live_view
The LiveView asset bundle was refreshed alongside these changes. The Phoenix routing guide also dropped an outdated problem statement, a docs-only edit.