Advertisement ยท 728 ร— 90

Posts by Giovanni

Post image

We're launching our new Elixir book! ๐ŸŽ‰

Programming Nerves: from web developer to hardware maker.

If you've ever been curious about hardware but felt intimidated, this is for you.

Beta available now (38% off), or download free chapters to get started.

#ElixirLang

3 months ago 24 9 1 0

Iโ€™m catching up with CSS with @piccalil.li โ€œComplete CSSโ€ course. It feels like a book (?) to me which is exactly how I like it.

Many โ€œwow we can do that nowโ€ moments too, very happy I can take this course

4 months ago 8 1 1 0

Delightful, this is very inspiring work !

4 months ago 2 0 0 0

Finally did it bsky.app/profile/gfra...

5 months ago 0 0 0 0

Here's the last call site if you want to check the code yourself: github.com/phoenixframe...

5 months ago 0 0 0 0

JS.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!

5 months ago 0 0 1 0

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.

5 months ago 0 0 1 0

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

5 months ago 1 0 1 0

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:

5 months ago 2 0 1 0
Advertisement

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 ๐Ÿงต

5 months ago 3 1 1 1
Preview
Phoenix | Technology Radar | Thoughtworks We continue to have positive experiences with Phoenix, a server-side web MVC framework written in Elixir. Phoenix builds on the rapid application development and developer [...]

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...

5 months ago 2 0 0 0

Great initiative from jump.ai ๐Ÿ‘

5 months ago 2 0 0 0

Consider sponsoring to Wikipedia today (:

6 months ago 6 1 0 0
Phoenix LiveView: Mastering Reconnects for a Seamless User Experience -Giovanni Francischelli
Phoenix LiveView: Mastering Reconnects for a Seamless User Experience -Giovanni Francischelli YouTube video by Code Sync

I 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 ๐Ÿ˜

7 months ago 3 0 1 0
Preview
Elixir Radar 481

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

7 months ago 6 3 0 0

Thank you โค๏ธ

8 months ago 1 0 0 0
Advertisement

Iโ€™ll try to give it a proper answer when I get some free time

8 months ago 1 0 1 0

Thank you ๐Ÿ’•!! I think a higher level API for this should probably be possible ๐Ÿค”

8 months ago 1 0 0 0
Phoenix LiveView: Mastering Reconnects for a Seamless User Experience -Giovanni Francischelli
Phoenix LiveView: Mastering Reconnects for a Seamless User Experience -Giovanni Francischelli YouTube video by Code Sync

My 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...

8 months ago 29 4 4 1

One of my fav talk from this conf. Great stuff ๐Ÿ˜

8 months ago 2 0 0 0

Espero q tenha se divertido tanto quanto eu ๐Ÿ˜

10 months ago 2 0 2 0

So 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?

11 months ago 2 0 1 0

Heey 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

11 months ago 1 0 1 0

Thanks! 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 ๐Ÿ™

11 months ago 1 0 1 0

Heey Petar, in your experience how does UX gets impacted negatively? Did the JS commands help? Thanks you for sharing ๐Ÿ™

11 months ago 0 0 2 0
Advertisement
Preview
Senior Fullstack Engineer (EU) EU

We 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.

1 year ago 32 12 2 2
See you there! elixirconf.eu 15-16 May 2025

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

1 year ago 10 2 1 0
Preview
GitHub - samaraoliveiram/poc-liveview-embedded Contribute to samaraoliveiram/poc-liveview-embedded development by creating an account on GitHub.

Hey something like it yes, there's a bare minimal proof of concept here github.com/samaraolivei...

1 year ago 1 0 0 0

With those other interop tools being available, don't you think saying *no JS is a core idea* isn't very accurate?

1 year ago 0 0 0 0

Thanks 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.

1 year ago 0 0 1 0