Repository navigation
feat(ui): add handle form to Confirmation block - #9755
alexcarpenter merged 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
🦋 Changeset detectedLatest commit: c2094e9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
5fdbf3e
into
carp/mosaic-desctructive-to-confirmation
Description
Adds a second, handle-driven form to the
Confirmationblock, for the "one dialog, many rows" case: a members table with a Remove in every row needs one confirmation mounted once after the table, not one per row.Confirmation.createHandle<Payload>()re-exports the Dialog handle.handle.open(payload)opens the block from anywhere;handle.close()closes it.title,description, andactionLabelaccept a value or a function of the payload.onConfirmreceives the payload.open, the pending state, and the error: the promiseonConfirmreturns closes the dialog when it resolves, and keeps it open showing the message when it rejects. A close request while the action is pending is ignored, so a dismissal never abandons an in-flight action. That lifecycle is a small machine inconfirmation.controller.ts.ConfirmationProps<Payload>is now the union ofConfirmationControlledPropsandConfirmationHandleProps<Payload>.Swingset gets a "One block, many rows" story and docs section. The long members-table story that opens the block from a row menu follows in the next PR, on top of #9752, which makes focus return to that menu's trigger.
Stacked on #9734.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change