Handle amp-form SSR success and error responses explicitly#25543
Merged
caroqliu merged 4 commits intoampproject:masterfrom Nov 14, 2019
Merged
Handle amp-form SSR success and error responses explicitly#25543caroqliu merged 4 commits intoampproject:masterfrom
caroqliu merged 4 commits intoampproject:masterfrom
Conversation
dreamofabear
approved these changes
Nov 11, 2019
wassgha
approved these changes
Nov 11, 2019
Contributor
|
LGTM |
micajuine-ho
pushed a commit
to micajuine-ho/amphtml
that referenced
this pull request
Dec 27, 2019
…t#25543) * Intended changes from PR ampproject#25242 * Will comments * Revert removal of `tryResolve()` as it creates friction in unit tests
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.
PR #25242 was recently reverted due to unexpected regression to the redirect behavior on
amp-formform submissions (see #25473 for context). This PR reintroduces the changes from the original PR while maintaining prior redirect behavior.Original PR text: SSR responses get passed fully to the submit-success and submit-error events on amp-form. These often include extra fields such as the HTML to render in the template. This change only exposes to the events the expected values of the amp-form response, such as data inserted into the form fields or relevant errors. b/138778080 cc/ @GoTcWang