Week 43 - Turbo Broadcasting without Redis, Web Push from Rails, and more!
In this edition we explore ways to broadcast Turbo Streams without Redis, talk about Hotwire Native for iOS, and share essential HTML best practices for login and sign-up forms.
Welcome to Hotwire Weekly!
Welcome to another issue of Hotwire Weekly! Happy reading! 🚀✨
📚 Articles, Tutorials, and Videos
Broadcast Turbo Streams without Redis - The article on Rails Designer explains how to broadcast Turbo Streams in a Rails app without using Redis. It discusses alternative setups like the async
adapter for development and the PostgreSQL adapter for production, which leverages the NOTIFY
command for updates. The guide also introduces Solid Cable, a new option that stores broadcast payloads in the database, making deployment simpler by reducing dependencies.
How do Turbo Streams Work (behind the scenes) - The article by Rails Designer explains how Turbo Streams work behind the scenes in Rails, covering how Turbo Streams can update the DOM through server-side broadcasts or controller actions. It breaks down the lifecycle of a Turbo Stream, detailing custom elements, JavaScript methods, and supported actions like append, prepend, and replace.
Hotwire Native iOS Part 1 - William Kennedy's article talks about Hotwire Native for iOS, starting with setting up a basic Rails app and integrating it with Hotwire Native. The guide walks through creating an iOS app in Xcode, configuring the app to serve server-side HTML, and enhancing the user experience using Path Configuration for modals.
11 HTML best practices for login & sign-up forms - Andrey Sitnik outlines 11 best practices on the Evil Martians blog for optimizing login and sign-up forms using HTML. It covers essential tips like using autocomplete
for better user experience, wrapping inputs in form
tags, avoiding placeholder-only labels, and ensuring keyboard accessibility with visible :focus
states.
Sending Web Push Notifications from Rails - The article by Ross Kaffenberger on the Joy of Rails explains how to set up Web Push Notifications in a Rails app using the Web Push API and Service Workers. It covers configuring VAPID keys for secure notifications, creating a manifest, and setting up the web-push
gem to send notifications from the server.
Rails for Beginners: Intro to Ruby on Rails 7 Full Stack Tutorial - Malachi Rails published a long format video and guides you through building a full-stack Rails application, covering both backend and frontend development.
Rich Text Laravel: Walkthrough - Tony Messias published a video in which he walks through the Rich Text Laravel package, which integrates the Trix editor for Laravel applications. It starts by exploring the package's workbench demo app, which includes blog and chat examples showcasing Trix features like mentions, HTML sanitization, and file attachments. The tutorial explains how to customize Trix for various use cases and demonstrates features such as automatic link conversion and Open Graph embedding.
Rails Development Tool - The Rails Designer article introduces a new Rails Development Tool that simplifies common tasks such as filling forms, toggling the console, and copying resource IDs. Built with ViewComponent and Stimulus, the tool includes handy keyboard shortcuts for quick actions.
"I shipped a new iOS and a new Android app in just a few hours each" - Carmine Paolino shares a thread on how they were able to build the native apps for Cluster Headache Tracker in just a few hours each thanks to Hotwire Native.
🧰 Libraries and Tools
rich-text-laravel - Integrates the Trix Editor with Laravel. Inspired by the Action Text gem from Rails.
turbo_power - Custom Turbo Stream Actions power-pack for Turbo Streams.
🎉 Releases
symfony/ux v2.21.0 - A JavaScript ecosystem for Symfony based on Stimulus.
tailwindcss-stimulus-components v6.1.0, v6.1.1, v6.1.2 - A set of Stimulus components for Tailwind CSS apps similar to the Bootstrap JavaScript components.
inertia_rails-contrib v0.3.0 - A collection of extensions, developer tools, and the community documentation for Inertia's Rails adapter.
tailwindcss-ruby v4.0.0.alpha.29 and v4.0.0.alpha.30 - A self-contained tailwindcss
executable, wrapped up in a ruby gem.
hot-glue v0.6.6 - Simple, plug & play Rails scaffold building companion for Turbo-Rails and Hotwire.
view_component v3.19.0 - A framework for building reusable, testable & encapsulated view components in Ruby on Rails.
vite_rails v3.0.18 - Use Vite in Rails and bring joy to your JavaScript experience.
Feel free to follow us on Twitter/X or on Mastodon!
See you next week!