Skip to content

feat(Form): prepare modern dialogs, examples, and compiler coverage - #1418

Merged
tenphi merged 4 commits into
mainfrom
andrew/modern-dialog-form-stories
Sep 22, 2026
Merged

tenphi merged 4 commits into
mainfrom
andrew/modern-dialog-form-stories

Conversation

@tenphi

@tenphi tenphi commented Sep 22, 2026

Copy link
Copy Markdown
Member

Passing a modern controller to DialogForm now selects the modern form implementation, with inferred callbacks, automatic closing after successful saves, and cancellation when the dialog closes. Existing legacy callers keep their callback and reset contracts.

The ordinary Storybook form examples now use modern controllers. The form, dialog, and input documentation recommend modern forms for new work and explain how both implementations coexist; dedicated legacy component references remain available.

  • Handle hidden dialogs, controlled closing, drafts, controller replacement, Strict Mode, and late async responses without resetting or closing a newly opened session. Popover actions stay open until saving succeeds; detached controllers reset using their own committed preserve policy.
  • Let explicit Submit/Cancel actions close a DialogTrigger when passive dismissal is disabled.
  • Add dialog coverage to the React Compiler suite, native Chromium interaction tests, legacy compatibility tests, and built-package type fixtures. Include the migrated stories in the source type-check gate.
  • Include a minor changeset. This PR is scoped to UI Kit; Cloud adoption follows separately.

Validation: full unit suite (2,815 passed, 1 skipped), React Compiler suite (143 tests), isolated store suite (126 tests), targeted Chromium suite (26 tests), source and built-consumer type checks, package/Storybook/docs builds, lint, docs audit, compiler diagnostics ratchet, and Chromatic snapshot budget. Migrated stories were rendered in Chromium with their play functions. Bundle size remains within the existing limits. The existing CI matrix also verifies the modern form and compiled suites on React 18 and 19.

Expected visual changes: validation stories now show their error states, the DialogForm story opens its dialog before capture, and complex forms distinguish the range slider label. Chromatic baseline acceptance is left for review.

@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cube-ui-kit Ready Ready Preview Sep 22, 2026 1:46pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 771503c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Minor

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

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

📦 NPM canary release

Deployed canary version 0.0.0-canary-9ab5d93.

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Passed?
All 514.58 KB (+0.12% 🔺) Yes 🎉
Tree shaking (just a Button) 116.88 KB (0% 🟰) Yes 🎉

Compared against main at 78a3a07run 35728724711, 2026-09-22T12:41:39Z.

To see which modules changed, download the size-limit-statoscope-report artifact from this run and open report.html.

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

🧪 Storybook is successfully deployed!

@tenphi tenphi left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found two reproducible issues in the new modern dialog lifecycle; details are inline.

Validation: the 24 existing modern/legacy dialog tests, 21 compiled dialog tests, and 126 isolated store tests pass. Additional regression cases reproduce both findings; the premature popover dismissal also reproduces in Chromium.

Comment thread src/components/overlays/Dialog/ModernDialogForm.tsx
Comment thread src/components/overlays/Dialog/ModernDialogForm.tsx Outdated

@tenphi tenphi left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 4f0f2a3 against the previous review. Both reported issues are fixed, and I found no new actionable issues in the follow-up changes. Verified and resolved both original review threads.

Local validation passed: 28 modern/legacy dialog tests, 25 React Compiler dialog tests, 4 Chromium dialog tests, and both original review reproductions. The new coverage includes built-in/custom popover actions, failed and pending saves, explicit cancellation, and controller replacement with different preserve policies.

At posting time, the React 18/19 CI jobs are green; the full Tests & lint job, Browser tests, and Chromatic checks are still running or pending.

@tenphi
tenphi merged commit e78bdb0 into main Sep 22, 2026
17 checks passed
@tenphi
tenphi deleted the andrew/modern-dialog-form-stories branch September 22, 2026 13:54
@tenphi tenphi mentioned this pull request Sep 22, 2026

This branch was successfully deployed

2 active deployments
Preview 771503ca Deployed Sep 22, 2026 by vercel[bot]
Chromatic staging 771503ca Deployed Sep 22, 2026 by tenphi via Prepare Storybook for review & tests #3844
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant