Page refreshes with morphing currently don't take into account if assets change. This can lead to a version of the page that doesn't match the styles or new JavaScript after a deploy.
An example of this could be the addition of a new Stimulus controller. If in a deploy the controller is added to the JavaScript assets and a user triggers a page refresh, there will be html making use of the new Stimulus controller, but the assets are still the old ones and therefore will not behave as expected. This could be solved for CSS styles but for JavaScript it's more difficult. Something similar applies to turbo frames.
I'm not sure how this could be solved. I thought about replicating the Turbo drive behavior in the morph renderer, but this could be quite nasty. You would lose scrolling, Turbo frames status, basically everything.
How could this be addressed? Thoughts?
Page refreshes with morphing currently don't take into account if assets change. This can lead to a version of the page that doesn't match the styles or new JavaScript after a deploy.
An example of this could be the addition of a new Stimulus controller. If in a deploy the controller is added to the JavaScript assets and a user triggers a page refresh, there will be html making use of the new Stimulus controller, but the assets are still the old ones and therefore will not behave as expected. This could be solved for CSS styles but for JavaScript it's more difficult. Something similar applies to turbo frames.
I'm not sure how this could be solved. I thought about replicating the Turbo drive behavior in the morph renderer, but this could be quite nasty. You would lose scrolling, Turbo frames status, basically everything.
How could this be addressed? Thoughts?