After thrashing through several attempts to add a smooth transition to the poll partial after the user votes, I realized that the best solution was hiding in plain sight. Turbo already sets the busy attribute on a turbo-frame element while the request is in progress, and adds a complete attribute when the request is complete. The only thing required was the styling!

#ktistec #hotwire #turboframes

🚀 "Revolutionary" #CSS trick turns Turbo Frames into the Usain Bolt of #loading states! 🏃‍♂️💨 Who needs #JavaScript when you can bloat your CSS instead? Just the thing Rails devs never knew they didn't need! 🙃
https://railsdesigner.com/visual-loading-turbo-frames/ #TurboFrames #RailsDev #HackerNews #ngated
Visual loading states for Turbo Frames
with CSS only

Learn how to add instant loading feedback to your Turbo Frames without JavaScript. I’ll walk you through using the aria-busy state with CSS pseudo-elements to show text or animated SVG spinners during slow requests.

Rails Designer
Visual loading states for Turbo Frames
with CSS only

Learn how to add instant loading feedback to your Turbo Frames without JavaScript. I’ll walk you through using the aria-busy state with CSS pseudo-elements to show text or animated SVG spinners during slow requests.

Rails Designer

Methods of dealing with missing Turbo Frames by Alessandro Rodi. Awesome.

coorasse.com/blog/hand…

#Rails #TurboFrames

Handling missing frames in Turbo

Some tips on how to handle missing frames with Turbo

Alessandro Rodi’s Blog

Maciek Korsan from @arkency is doing a #webinar titled "From #React to #Hotwire — an unexpected journey" on the 30th of January. It's the Thursday in two weeks.

https://arkency.com/webinars/from-react-to-hotwire/

#arkency #stimulusjs #turboframes #rails #rubyonrails #ruby

From React to Hotwire – An Unexpected Journey

Join us for a webinar where we'll explore the unexpected journey from React to Hotwire, and how it transformed my development process.