feat: turbo frame for job filter (partial page reload)#4
Merged
Conversation
…resh Wraps the filter form and results table in a <turbo-frame> so selecting a queue, priority, period, or submitting a search reloads only that region. requestSubmit() replaces form.submit() on select onChange so Turbo intercepts the event rather than bypassing it. data-turbo-action="advance" keeps the browser URL in sync. Turbo JS loaded from esm.sh in the engine layout since the engine renders its own <head>. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<turbo-frame>so selecting a queue, priority, period, or submitting a class search reloads only that region instead of the full pageonChangeto userequestSubmit()instead ofsubmit()—submit()bypasses Turbo's event listener entirely, causing full page reloads regardless of frame contextesm.shCDN in the engine layout — the engine renders its own<head>so the host app's Turbo was never present on these pagesHow it works
<turbo-frame id="sqw-jobs-filter" data-turbo-action="advance">wraps the filter form and#sqw-jobs-tabledivdata-turbo-action="advance"keeps the browser URL and history in syncturbo_streamdiscard (which targets#sqw-jobs-tabledirectly) continues to work — Turbo Streams operate on the full DOM regardless of frame boundariesTest plan
bundle exec rakepasses (21 examples)🤖 Generated with Claude Code