Showing Posts 1 to 6

allenwyma

allenwyma

sorry to tag people, but i think this would be interesting to have in LiveView: @josevalim @chrismccord

from my understanding after talking with a CSS DevRel from Google last week, the JS API is more supported than the CSS version for View Transitions. Would this be something that morphdom would need to have or is there an easy way we can “monkey patch” the applyDiff as was done in his example?

The main problem, in my understanding, is that you need to use document.startTransition(async() => applyDiff()), where all of your DOM manipulation needs to happen within the callback.

LostKobrakai

LostKobrakai

I’ve asked chris about this some time ago on slack. The response was that we doesn’t want to add non-stable APIs into LV, but is open to consider callbacks/hooks, so people can add the necessary integration by themselves.

allenwyma

allenwyma

that’s actually what i’m looking for: if we can have a callback/hook then it would be easy for us to add this in, even if the API changes.

From my understanding, this is “stable” API in the sense that it’s going to be used, and it’s in next version of Safari for both iOS and MacOS, and is already in Chrome.

mssantosdev

mssantosdev OP

I think using view transitions with hooks is doable, but not a good idea.

We would have to add manual UI updates with https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#push_event/3, which would kill some of the benefits that LV brings to the table.

But I understand the point of not having non-stable APIs into LV core.

LostKobrakai

LostKobrakai

I’m not talking about the literal js hooks, but another (likely new/to be proposed) callback similar to e.g. the dom callback you have on the LV constructor, which would allow you to wrap the morphdom change application with the view transition api.

mssantosdev

mssantosdev OP

Got it, sorry for misunderstanding you. Yes, having a callback like the one you mentioned is a great idea to handle the API usage.

— All posts loaded —

Where Next? Top

Trending in Blog Posts Top

pckrishnadas88
Hey everyone! :waving_hand: I’ve published Part 7 of the Building Distributed Systems in Elixir series, where we build core distributed ...
New
mudasobwa
So, instead of wasting my afternoon arguing with anonymous handles on X, I turned to my trusty, soulless assistant and said: “Listen, ple...
New
zorn
An educational side project in Elixir, Phoenix, and Tauri. I share what I learned while wiring Automerge into the BEAM, including how I s...
New
abreujp
New article: Elixir Project Structure — From mix new to a Growing Codebase I’ve published a new article in my Elixir learning series on d...
New
zorn
:pencil: Phoenix’s built-in LiveView test helpers require you to hand-build the form payload and start a fresh pipe after every click. Wo...
New
jola
Wrote about how to safely run a globally unique process in an Elixir cluster, and a scary story from the past! Learn about :global for r...
New
jola
The way Phoenix is set up adding a CDN sub-domain for serving static assets, without worrying about the main dynamic content, is incredib...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews