Finally did it bsky.app/profile/gfra...
13.11.2025 13:31 β π 0 π 0 π¬ 0 π 0@gio.wtf.bsky.social
He/Him, Brazilian, Elixir enthusiast. Swimming in nature and cinema makes me happy.
Finally did it bsky.app/profile/gfra...
13.11.2025 13:31 β π 0 π 0 π¬ 0 π 0Here's the last call site if you want to check the code yourself: github.com/phoenixframe...
13.11.2025 13:19 β π 0 π 0 π¬ 0 π 0JS.set_attribute/2 under the hood runs DOM.putSticky(el, name, operation) which stores the "operation" function in a private key in the DOM element.
While patching, DOM.applyStickyOperations(toEl) re-plays all stored DOM operations which should stick through patching!
Think of CSS transitions, caret position, scroll state. All is preserved while efficiently updating the DOM.
morphdom `onBeforeElUpdated(fromEl, toEl)` callback allows tapping into the transform. LV uses it to re-apply DOM "sticky" operations to the toNode, the "target" state.
LiveView server-side renders new HTML, and sends to client the smallest diff necessary to update the client DOM to match the server state
The DOM patching is done by morphdom, which transforms the existing DOM tree to match a new DOM tree in order to preserve internal state of the original elements
TLDR; LiveView "sticky" DOM operations re-run when DOM is patched with new HTML
Demo: gio.wtf/demos/sticky...
Here's the explanation of how it works:
Why LiveView DOM patching doesn't overwrite attributes updated through JS commands? This is one of the top questions I received after my "mastering live view reconnects" talk.
I finally have time to explain it π
Answer and link to demo in the thread π§΅
Cool to see #PhoenixLivewView featured on latest @thoughtworks.com Tech Radar
βwell-suited for building highly interactive frontends without the need for a full JavaScript frameworkβ
Avoiding unnecessary JS bloat is key to achieve high performance at low cost
www.thoughtworks.com/radar/langua...
Great initiative from jump.ai π
07.11.2025 09:17 β π 1 π 0 π¬ 0 π 0Consider sponsoring to Wikipedia today (:
02.10.2025 08:00 β π 6 π 1 π¬ 0 π 0I believe this is a solved problem in the sense that the tools are there. DX could be improved tho to make it more obvious tho: www.youtube.com/watch?v=AnbW...
Would love to hear your thoughts. And totally agree with Elixir happiness π
Elixir Radar issue 481 is out! π£
You can read it here: buff.ly/gJLStkm
This issue comes with content from @josevalim.bsky.social @solnic.dev @wojtekmach.bsky.social @gfrancischelli.bsky.social , Chris O'Donnell and Baptiste Chaleil. Thank you!
#ElixirLang
Thank you β€οΈ
15.08.2025 09:44 β π 1 π 0 π¬ 0 π 0Iβll try to give it a proper answer when I get some free time
08.08.2025 09:01 β π 1 π 0 π¬ 1 π 0Thank you π!! I think a higher level API for this should probably be possible π€
08.08.2025 08:58 β π 1 π 0 π¬ 0 π 0My talk at #ElixirConf is live π
100% biased but I highly recommend watching it if you are doing #LiveView #Elixir π
I explain not only how to fix reconnect issues, but even how to eliminate them with some software design adjustments that also improve DX and UX!
www.youtube.com/watch?v=AnbW...
One of my fav talk from this conf. Great stuff π
19.07.2025 05:57 β π 2 π 0 π¬ 0 π 0Espero q tenha se divertido tanto quanto eu π
16.05.2025 14:02 β π 2 π 0 π¬ 2 π 0So for the "Pure UI" logic, where to draw the line between using JS commands versus relying on LV assigns which might make UX suffer if connection is slow? That's the criteria I'm trying to come up with, so devs can use it to guide design decisions. What state should be tracked in the client only?
13.05.2025 06:40 β π 2 π 0 π¬ 1 π 0Heey thanks for engaging! Optimistic UI covers a lot of what I'm looking, but not everything. Some UI interactions have nothing to do with accessing remote data. But lots of LV developers fall in the mistake of using assigns to control some piece of UI that could be controlled by JS commands
13.05.2025 06:40 β π 1 π 0 π¬ 1 π 0Thanks! Didnt know this video. In my experience thereβs usually a way to leverage JS cmds to drive the UI and fix UX when server feels distant. Iβm trying to arrive at a definition/rule that helps identifying when this is possible. If u dont mind sharing some specific example would be very helpful π
12.05.2025 16:39 β π 1 π 0 π¬ 1 π 0Heey Petar, in your experience how does UX gets impacted negatively? Did the JS commands help? Thanks you for sharing π
12.05.2025 15:42 β π 0 π 0 π¬ 2 π 0We are hiring an #elixirlang engineer in the EU (UK, Ireland, Netherlands, Spain or Portugal).
No need to already know Elixir. We will teach you. Want to work on an amazing team?
Go here: job-boards.greenhouse.io/workera/jobs...
If you have questions on the role. DM me.
See you there! elixirconf.eu 15-16 May 2025
Very excited to share I'll be presenting "Phoenix LiveView: Mastering Reconnects for a Seamless User Experience" at @elixirconfeu.bsky.social π
#elixirconfeu
Hey something like it yes, there's a bare minimal proof of concept here github.com/samaraolivei...
08.02.2025 16:19 β π 1 π 0 π¬ 0 π 0With those other interop tools being available, don't you think saying *no JS is a core idea* isn't very accurate?
25.12.2024 19:54 β π 0 π 0 π¬ 0 π 0Thanks mate! What are your thoughts on js hooks and JS.dispatch then, aren't they encouraging to write JS?
Personally I see Phoenix.JS just as a convenience layer of interoperability plus composability goodies.
Hey Josh, do you mind saying why you consider *no JS* a core idea? Asking because I don't really see it, and I'm curious to understand how exactly our experiences diverge.
25.12.2024 19:42 β π 0 π 0 π¬ 0 π 0Thanks @whatyouhi.de for this blog post andrealeopardi.com/posts/get-ri... β€οΈ
I vaguely remembered seeing this before, today it saved us time π
Seems like #LiveView is way more popular tag
09.12.2024 14:45 β π 0 π 0 π¬ 0 π 0