Repository navigation
Wire discard dialog for Shipping Address Element - #14978
Merged
Merged
Conversation
2 of 3 tasks
cttsai-stripe
added this pull request to stack #14979
October 9, 2026 23:51
cttsai-stripe
force-pushed
the
cttsai/address-element-discard-dialog-sae
branch
from
October 15, 2026 17:58
c7e8282 to
bc90cc3
Compare
1 of 3 tasks
cttsai-stripe
removed this pull request from stack #14979
October 15, 2026 23:07
cttsai-stripe
changed the base branch from
master
to
cttsai/address-element-saving-indicator
October 15, 2026 23:07
cttsai-stripe
added this pull request to stack #15031
October 15, 2026 23:07
cttsai-stripe
force-pushed
the
cttsai/address-element-discard-dialog-sae
branch
3 times, most recently
from
October 16, 2026 05:15
ac6afff to
2b84365
Compare
cttsai-stripe
removed this pull request from stack #15031
October 16, 2026 05:30
cttsai-stripe
changed the base branch from
cttsai/address-element-saving-indicator
to
master
October 16, 2026 05:31
cttsai-stripe
added this pull request to stack #15035
October 16, 2026 05:31
1 of 3 tasks
cttsai-stripe
force-pushed
the
cttsai/address-element-discard-dialog-sae
branch
from
October 16, 2026 05:34
2b84365 to
ccd2b19
Compare
2 of 3 tasks
cttsai-stripe
removed this pull request from stack #15035
October 16, 2026 16:58
cttsai-stripe
changed the base branch from
master
to
cttsai/address-element-shared-theme
October 16, 2026 16:58
cttsai-stripe
added this pull request to stack #15040
October 16, 2026 16:58
cttsai-stripe
force-pushed
the
cttsai/address-element-discard-dialog-sae
branch
2 times, most recently
from
October 16, 2026 17:08
a16fa3d to
d1914c5
Compare
Base automatically changed from
cttsai/address-element-shared-theme
to
master
October 16, 2026 17:49
Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
cttsai-stripe
force-pushed
the
cttsai/address-element-discard-dialog-sae
branch
from
October 16, 2026 17:49
d1914c5 to
0108b7e
Compare
Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
cttsai-stripe
commented
Oct 16, 2026
| } | ||
|
|
||
| @Test | ||
| fun `checkout shipping close requests confirmation when input is unchanged`() = runScenario { |
Contributor
Author
There was a problem hiding this comment.
This will change in a later PR.
cttsai-stripe
force-pushed
the
cttsai/address-element-discard-dialog-sae
branch
from
October 16, 2026 18:28
5943072 to
c912377
Compare
Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
cttsai-stripe
force-pushed
the
cttsai/address-element-discard-dialog-sae
branch
from
October 16, 2026 18:52
c912377 to
3fa0b26
Compare
cttsai-stripe
marked this pull request as ready for review
October 16, 2026 19:30
amk-stripe
reviewed
Oct 19, 2026
Comment on lines
+74
to
+77
| else -> { | ||
| dismiss() | ||
| false | ||
| } |
Collaborator
There was a problem hiding this comment.
is there any risk to this change? I'm concerned about bugs where a customer is unable to dismiss the address element
Contributor
Author
There was a problem hiding this comment.
Added a test finished cancellation allows the sheet to hide without requesting confirmation again to prevent regression.
Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
amk-stripe
approved these changes
Oct 19, 2026
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
Shipping Address Element now asks before dismissal through Close, root Back, or the sheet scrim. Cancel keeps editing; Discard reports cancellation and returns the existing canceled result. This stage prompts for every SAE dismissal, including unchanged input; standalone Address Element still cancels directly.
Motivation
Build on #14971's cancellation state so confirmation, saving, and completion share one state owner. The Activity renders the dialog from
ConfirmingCancellation; Discard enters the existingCancelingpath, which records analytics before publishing the result.The dialog inherits the shared Activity theme from #15039.
During confirmation the form is disabled, but saving is not in progress. The save spinner therefore follows
Savingspecifically.Flow
stateDiagram-v2 Idle --> ConfirmingCancellation: SAE dismissal ConfirmingCancellation --> Idle: Cancel ConfirmingCancellation --> Canceling: Discard Idle --> Canceling: Standalone dismissal Canceling --> Finished: Report cancellation, then completeThe follow-up #14848 adds address and checkbox change detection and enables confirmation for standalone Address Element.
Testing
Local
AddressElementActivityTestandAddressElementActivityAnalyticsTestpassed, along with all six appearance/theme snapshots. The new hide-gate test failed as expected whenFinishedrejected hiding, then passed after restoring the correct behavior. Snapshots were renamed for the rule-driven appearance matrix with no image changes. No emulator checks for this revision.Screenshots
Changelog
No entry: this stage changes only Shipping Address Element, which is guarded by
@RestrictTo(LIBRARY_GROUP).Committed and created by Codex.