Use view transitions for failed form submissions#1457
Open
tvararu wants to merge 1 commit intohotwired:mainfrom
Open
Use view transitions for failed form submissions#1457tvararu wants to merge 1 commit intohotwired:mainfrom
tvararu wants to merge 1 commit intohotwired:mainfrom
Conversation
de6c19f to
0b39d4b
Compare
skmedix
reviewed
Nov 19, 2025
View transitions don't work when forms return 422 or 500, because `formSubmissionFailedWithResponse` calls `view.renderPage()` directly. This change implements `ViewTransitioner` and wraps the existing render and scroll calls with `.renderChange`. Reviewing without whitespace changes (`-w`) is recommended. The new test is similar to `drive_view_transition_tests.js`, but I had to add a `/reject/view-transition` route to the test server.
0b39d4b to
ff391fb
Compare
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.
View transitions don't work when forms return 422 or 500, because
formSubmissionFailedWithResponsecallsview.renderPage()directly.This change implements
ViewTransitionerand wraps the existing render and scroll calls with.renderChange. Reviewing without whitespace changes (-w) is recommended.The new test is similar to
drive_view_transition_tests.js, but I had to add a/reject/view-transitionroute to the test server.New tests pass:
Before: No transitions
Screen.Recording.2025-11-05.at.11.20.36.mov
After: With transitions
Screen.Recording.2025-11-05.at.11.21.27.mov