Repository navigation
fix(plugin-form): object-form's modalCloseButton: false hides the modal's close button (objectui#11061) - #11091
Conversation
…al's close button (objectui#11061) `MobileDialogContent` gains an optional `showCloseButton` (default true); `false` leaves its close button out of the DOM. `ModalForm` passes `modalCloseButton !== false` to it on both dialog arms (the flat form and the subforms master-detail form), so the declared and forwarded key now takes effect. Escape and Cancel still reach onOpenChange(false). The object-form registration description is restored to state that the key is honoured by ModalForm, and the schema reference gains its row. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec
…casting to any Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec
|
changeset-claim-re-read
|
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: Inputs read, and nothing else: card #11061 (body and all five comments: triage ① Derived judgmentsEvery accept-set and public-surface change the diff implies, each judged:
Nothing else in the 7-file diff implies a surface change. ② Semver level
③ Boundary flagsRound 1 Round 2 Round 2
Dev "NOT MEASURED" gates ( Check-runs on the head ( Notes for the seat, with no verdict weight: the PR's Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #11061
Clause-②: yes
An author can now hide a modal form's close (X) button.
object-form'smodalCloseButtonwas declared onObjectFormSchemaand on theobject-formregistration, andObjectForm's modal route forwarded it, butModalFormnever read it. As a result,modalCloseButton: falsestill drew the X, with no effect and no error. The route is A from the seat's answer on the card (comment 5889172074, amending claim 5888697196): the switch lives on the shared dialog wrapper.What changes
@object-ui/components:MobileDialogContent(incustom/mobile-dialog-content.tsx) gains an optionalshowCloseButton, defaulttrue.falseleaves the close button out of the DOM. The name and default match upstream Shadcn'sDialogContent, whose parameter isshowCloseButton = trueinapps/v4/registry/new-york-v4/ui/dialog.tsxon shadcn-ui/ui main. That was read once for this PR, and nothing here re-derives it. The prop is destructured, so it never reaches the Radix content element as a DOM attribute. The props type is exported asMobileDialogContentPropsthroughcustom/index.ts'sexport *. That follows the package's convention: mostcustom/wrappers export their props type. For the contract review: the published surface gains one optional member on the component's props, plus that one named type.@object-ui/plugin-form:ModalFormcomputesshowCloseButton = schema.modalCloseButton !== falseonce, and passes it on BOTH dialog arms: the flat form and thesubformsmaster-detail form. Only an explicitfalsehides the button; unset andtruekeep it. ThemodalCloseButtonJSDoc onModalFormSchemanow says this.object-formregistration'smodalCloseButtondescription is restored to what is now true. It is honoured byModalFormon both arms, and the modal still closes on Escape, and on the Cancel action when that is shown. The old wording before objectui#11050 carried a cross-file line address, which is not restored.modalCloseButtonrow is added to theobject-formtable incontent/docs/api/schema-reference.md..changeset/11061-modal-close-button.md:@object-ui/components: minor,@object-ui/plugin-form: patch.packages/types.Pins
packages/components/src/__tests__/mobile-dialog-show-close-button-11061.test.tsxtrue.false, the dialog still renders its content but holds no button, and carries no leakedshowclosebuttonattribute.onOpenChange(false)with the button hidden.packages/plugin-form/src/__tests__/modalCloseButton-11061.test.tsxObjectForm, so the forwarding hop is inside the pin.truekeep the close button (the control rows).falsehas no close button.onOpenChange(false), and Cancel reachesonOpenChange(false)andonCancel.falsehas none and still closes on Escape.Verification (all at HEAD
6231bf720, branch merged with maina5841be35)os-verify-lock, 'VERDICT command-exit 0'; shared-box figures):turbo run build --filter='@object-ui/plugin-form^...' --concurrency=2: 'Tasks: 11 successful, 11 total'.pnpm --filter @object-ui/components type-check: exit 0.pnpm --filter @object-ui/plugin-form type-check: exit 0. Both runtsc --noEmitand thentsc -p tsconfig.test.json.pnpm exec vitest run --maxWorkers=2coveredpackages/plugin-form/, the fourmobile-dialog-*test files in components, andapps/console/src/__tests__/registry-inputs-spec-parity.test.ts. Result: 'Test Files 148 passed (148)', 'Tests 1918 passed | 1 skipped (1919)'. 148 is the 143 tracked plugin-form test files plus the 5 named files, so both new pins ran.ablation-replace.mjswith a trap restore, both pins run each time):ModalForm'sconst showCloseButton = schema.modalCloseButton !== false;toconst showCloseButton = true;. The anchor went from 1 to 0 hits, and the blob changed from62fd6bcd4e06toafa17b9d7e7a. Result: 'Tests 2 failed | 9 passed (11)', the twofalserows of the ModalForm pin.{showCloseButton && (to{true && (. The blob changed fromdd2d1daed4fctoa357b2a3d367. Result: 'Tests 3 failed | 8 passed (11)', the wrapper'sfalserow plus the same two ModalForm rows.git diff HEADis empty, and 'Tests 11 passed (11)'.--format json: 5 files): 0 errors.a5841be35, linted fromgit showthrough--stdin. The two new pins have 0.eslint.config.jsconfigures no type-aware parsing (noprojectService,projectorTypeCheckedconfig), so these per-file verdicts cannot move on an untouched file. The fullpnpm lintis CI's.node scripts/check-changeset-presence.mjs(1 changeset for 5 published source files of 2 packages),check-control-bytes,check-changeset-no-major,check:new-line-citations(0 new),check:component-surface-parity,check:changeset-claims,check:pending-changeset-literals,check:unreferenced-sources,check:test-path-roots,check:doc-types,check:doc-fences.check:readme-exportsandcheck:doc-snippetsneed a whole-tree build.check:sdui-registration-pinsneeds a console build.Acceptance notes
content/docs/api/schema-reference.mdis outside the amended file surface. It was added under AGENTS.md Add automated testing infrastructure and CI/CD workflows #2 (docs-driven): one table row, no snippet.modalCloseButtonunset,trueandfalse, the dialog drew 1, 1 and 1 close buttons, and Escape and Cancel already reachedonOpenChange(false)in all three cases (report 5889134591 on the card).Generated by Claude Code