The Wire · Showcase
Phoenix LiveView cleans up its act
By RepoJournal · Filed · About Elixir & Phoenix
Two upstream fixes in phoenix_live_view squelch lingering timers and stale submits that have been biting production apps.
Phoenix LiveView shipped two targeted fixes overnight that address real-world footguns in long-lived sockets [1][2]. The first cancels infinite scroll throttle timers on hook destroy, so a pending timeout no longer fires up to 500ms after the hook is gone and pushes a viewport event for a removed element [1]. The second cancels the submit when EntryUploader.error is invoked, closing issue #4382 [2]. This is the kind of cleanup you feel when your infinite scroll gets janky or a double-submit slips through on a failed upload. Both are small, surgical changes; the Merge Queue also picked up an asset update [3]. If you're on an older LiveView patch, watch the changelog, this is the upgrade you've been waiting for.
One email a day. Unsubscribe in one click.
Keep up with Elixir & Phoenix in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Pull the latest phoenix_live_view main to test these fixes in your infinite scroll and upload flows phoenixframework/phoenix_live_view [immediate]
- → Monitor the changelog for a patch release that includes #4384 and #4388 phoenixframework/phoenix_live_view [monitor]
References
- [1] Cancel infinite scroll throttle timers on destroy ↗ phoenixframework/phoenix_live_view
- [2] Cancel submit in EntryUploader.error ↗ phoenixframework/phoenix_live_view
- [3] Update assets phoenixframework/phoenix_live_view