Week 33 - RubyMine adds Stimulus Support, sharing Turbo Frames across views, and more!
Hotwire Weekly: RubyMine 2024.2, Nested Forms, Custom Progress Bars, Action Web Components, & more! 🚀
Welcome to Hotwire Weekly!
Welcome to the another issue of Hotwire Weekly! This week is packed with new content and releases! Enjoy! 🚀
📚 Articles, Tutorials, and Videos
RubyMine 2024.2 Is Out! - JetBrains released RubyMine 2024.2 and includes built-in support for Stimulus. While this is great news, we still hope to see a future collaboration to help improve the developer tooling around Hotwire, including support for initiatives like the Stimulus LSP and Turbo LSP.
Nested Forms With Turbo (without dependencies) - Rails Designer explains how to create nested forms in Rails using Turbo without relying on third-party gems. It walks through setting up models, controllers, and views to handle nested attributes, and shows how to dynamically add and manage nested fields using Turbo Streams.
Conditionally render a Turbo Frame shared between multiple views - Steve Polito latest blog post on the thoughtbot blog explores how to conditionally render Turbo Frames in Rails, focusing on optimizing the user experience in situations like inline editing. It provides a detailed guide on managing Turbo Frames based on different contexts.
Getting Started with Turbo Native in Ruby on Rails - Yaroslav Shmarov follows up with a video to last weeks article on the same topic talking about getting started with Turbo Native in Rails applications.
Custom progress bars with Rails and Hotwire - Andy Leverenz shows how to create custom progress bars in Rails using Turbo, Stimulus, and Tailwind CSS, offering a more tailored loading experience compared to the default Turbo bar. Watch the video or read the blog post.
A decoupled approach to relaying events between Stimulus controllers - Justin Searls explores a method for decoupling event handling between Stimulus controllers in Rails applications. This approach allows for more maintainable and flexible code by reducing dependencies between controllers while still enabling effective communication and interaction.
Build a modal form with Rails, Turbo, and the dialog element - Matt Brictson demonstrates how to create a modal form in a Rails application using Turbo and the native HTML <dialog>
element. The tutorial covers building a reusable modal component, integrating it with Rails controllers.
Action Web Components Which Span the Server-Client Divide - Jared White explores the concept of "Action Web Components" to create server-client interactions using native HTML and JavaScript. It emphasizes a "HTML-first" approach, minimizing dependencies and avoiding complex build tools, to streamline web development while maintaining flexibility and performance.
Fixing the Rails 7+ networking stack - Thomas Cannon talks about the Rails 7 networking stack and tries to addresses fixing it by simplifying HTTP requests, improving fetch/AJAX handling, and introducing lightweight real-time updates with tools like Mrujs and CableReady, offering alternatives to "Turbo's complexity".
Hotwire Club: Turbo Drive - Use ULIDs for Optimistic UI - Julian Rubisch published a new challange for The Hotwire Club about Optimistic UIs using ULIDs.
🧰 Libraries and Tools
stimulus-use - A collection of composable behaviors for your Stimulus Controllers.
current.js - A tiny library that allows you to access current <meta>
elements.
🎉 Releases
stimulus-rails v1.3.4 - Use Stimulus in your Ruby on Rails app.
django-turbo-helper v2.1.4 - Turbo Helpers for Django.
symfonx/ux v2.19.0, v2.19.1, and v2.19.2 - The JavaScript ecosystem for Symfony built on Stimulus.
tailwindcss-rails v2.7.3 - Integrate Tailwind CSS with the asset pipeline in Rails.
vite_ruby 3.8.0 - Use Vite in Ruby and bring joy to your JavaScript experience.
propshaft v0.9.1 - Propshaft is the new asset pipeline library for Rails.
Feel free to follow us on Twitter/X or on Mastodon!
See you next week!