$ the-wire · showcase
Formatter comment fixes, LiveView patch handling corrected
By RepoJournal · Filed · About Elixir & Phoenix · Composed from the cited sources · methodology
Two formatter bugs that made source uncompilable or non-idempotent are fixed in Elixir, while LiveView aligns patching with mount when no handle_params/3 exists.
Only call handle_params/3 on patch if it's defined, raising if nothing handles params phoenixframework/phoenix_live_view
Patching a LiveView used to call handle_params/3 unconditionally after :handle_params hooks returned {:cont, socket}, crashing with UndefinedFunctionError for views whose params are handled only by a hook; the patch paths now check for the callback the way mount does. Hooks no longer have to {:halt, socket} to dodge the call, which skipped any hooks attached after them.
Fix formatter comment handling in calls and interpolations elixir-lang/elixir
Comments inside interpolations in sigils, charlists and quoted atoms were moved into the interpolation and could comment out the closing }, producing source that did not compile; in heredoc sigils and charlists the comment was dropped outright. Both are now moved outside the interpolation, matching strings, and comments after the first keyword value of a parenthesized-less call keep their posit...
Properly apply fun in map callbacks elixir-lang/elixir
fun_apply_or_none was not computing the result properly, so map callbacks applied fun to the wrong values; the fix also reopens the earlier issue that was closed against this bug, with the intended path being to track when callbacks are strong. A test documents that map update may now differ by map type representation.
allow to enable reconnecting while hidden phoenixframework/phoenix
Phoenix adds a switch to enable reconnecting while the page is hidden, so a socket dropped in a background tab no longer waits for visibility to re-establish.
Handle file selection when LV is not connected phoenixframework/phoenix_live_view
The long tail: file selection now behaves when the LiveView is not connected, closing two open issues, alongside routine asset refreshes in Phoenix and LiveView.