Turbo Frames: inline “details drawer” without a SPA router

7929
0

A common UI is a list on the left and a details panel (drawer) on the right. With Turbo Frames, each list item link can target a details frame. Clicking an item swaps the drawer content while leaving the list intact. The server still renders HTML, so you can reuse the show partials, authorization rules, and helpers. I like this pattern because it preserves URLs: the drawer can reflect items/:id, and you can open the item in a new tab. If you want the URL to update while targeting a frame, consider the Turbo-Location header or a top-level visit link. The key is ensuring the show response wraps content in the details frame so Turbo can replace it cleanly.