Decision 4's never-nest rule destroys a filled-in form before the user confirms #235
Labels
No labels
build-dist
priority
P1
priority
P2
priority
P3
priority
P4
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Toilville/toilville-design#235
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split out from #231 decision 4, which is otherwise settled. The never-nest principle stands; only its sequencing needs a second look.
The rule as written
Never nesting a confirmation over a form is right. Stacked modals are the thing that makes a destructive confirmation feel routine, and #182's severity levels only mean something if the dialog that carries them is the only thing on screen.
The hazard
"The form presentation ends first" tears down a filled-in form before the person has confirmed. The rule says nothing about what happens to their input if they then cancel.
Three plausible readings, and they are very different products:
(3) is the cheapest and the safest, and it satisfies the principle as stated: the confirmation is not nested in the form, it supersedes it. But that is a reading of the rule, not what the rule says, so it needs ratifying rather than assuming.
Why this is design's call and not engineering's
Either answer is buildable. The question is what the person should experience when they back out of a confirmation — whether the form is a thing they were in and returned to, or a thing that ended. That is an interaction decision, so it belongs here.
The engineering consequence follows from the answer: (2) needs form-state preservation across a dismiss, which is work that does not exist; (3) needs the focus and dismissal behaviour of
FocusTrap(lib/utils/focus_trap.dart) to handle two stacked routes where the lower one is inert. (1) needs nothing, which is the tell.Constraint that does not bend
Whichever is chosen,
CLAUDE.md's escape-hatch rule still applies: any blocking state offers a way out — Escape, an X, or a visible Cancel. A confirmation that can only be dismissed by completing it is not an option here.Acceptance
Decision for #235: a confirmation over a form.
The confirmation is the only interactive surface. It is not the only visible surface. This supersedes the wording in #231 decision 4: "The #182 confirmation dialog never nests over a form dialog. The form presentation ends first. Then the confirmation step starts."
The rule
What "never nest" means now
Two interactive dialogs at the same time is the thing to avoid. A dimmed, inert form behind one confirmation is not that. The test is one interactive surface at a time. It is not one visible surface. "The dialog is the only thing on screen" (this issue) is read the same way.
Scope
Constraints that stay (#182)
Acceptance
Implementation, for the follow-up
showDialogfocus is not enough. In a probe, focus landed on the dialog itself, not on a control.