From 33ded9889726335ca4d1de4fe46819d7144cd7cf Mon Sep 17 00:00:00 2001 From: woksin Date: Tue, 11 Aug 2026 14:21:33 +0200 Subject: [PATCH 1/4] Offer a footer Cancel on a stepper command dialog The X in the header was the only way out of a wizard, which is easy to miss on a long or destructive flow and disappears entirely when the dialog is presented without a visible header. The cancel path itself already existed - the X routes through it - so this only surfaces it as a button. It is opt-in, because turning it on by default would silently re-lay-out every wizard already in use. The button sits leftmost, before Previous and outside the spacer, so it stays in the same place when Previous appears on the second step rather than sliding across as the footer fills. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01UWugkmN6NmoemKeTvSKNDg --- Source/CommandDialog/StepperCommandDialog.tsx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Source/CommandDialog/StepperCommandDialog.tsx b/Source/CommandDialog/StepperCommandDialog.tsx index c739bee..5376936 100644 --- a/Source/CommandDialog/StepperCommandDialog.tsx +++ b/Source/CommandDialog/StepperCommandDialog.tsx @@ -71,6 +71,14 @@ export interface StepperCommandDialogProps + {showCancel && ( + + + {outcome && ( +
+ Outcome: {outcome} +
+ )} + + + command={SlowCreateProjectCommand} + visible={visible} + title="Create New Project" + okLabel="Create" + showCancel + cancelLabel="Discard draft" + autoServerValidate={false} + onConfirm={async () => { + setOutcome('Created'); + setVisible(false); + }} + onCancel={() => { + setOutcome('Discarded'); + setVisible(false); + }} + > + + + value={c => c.name} + title="Project Name" + placeholder="Enter project name (min 2 chars)" + /> + + value={c => c.email} + title="Contact Email" + placeholder="Enter contact email" + type="email" + /> + + + + value={c => c.description} + title="Description" + placeholder="Describe the project (min 10 chars)" + rows={4} + /> + + value={c => c.budget} + title="Budget" + placeholder="Enter budget (must be > 0)" + /> + + + + ); + }, +}; + /** * A step rendered as `{condition && }` disappears entirely when the condition * is false. Toggle the optional step off and the dialog must behave as a genuine two-step