Skip to content

replace unmaintained @reach/dialog with @radix-ui/react-dialog#82

Merged
vahag-curity merged 7 commits intodevfrom
fix/replace-reach-dialog-with-radix-ui-react-dialog
Mar 17, 2026
Merged

replace unmaintained @reach/dialog with @radix-ui/react-dialog#82
vahag-curity merged 7 commits intodevfrom
fix/replace-reach-dialog-with-radix-ui-react-dialog

Conversation

@vahag-curity
Copy link
Copy Markdown

@vahag-curity vahag-curity commented Mar 16, 2026

Summary

  • Replace @reach/dialog with @radix-ui/react-dialog@reach/dialog is unmaintained; Radix Dialog is actively maintained and supports React 16–19
  • Remove legacy-peer-deps=true from all .npmrc files
    • Root cause: component-library declared peerDependencies: react ^18.0.0 while actually using React 19
    • Fixed by widening peer deps to ^18.0.0 || ^19.0.0
    • Removed the workaround from all 5 .npmrc files (root, component-library, self-service-portal, css/docs, css/lib)
  • Update @types/react and @types/react-dom to ^19 in css/docs to match the actual React 19 runtime
  • Consolidate .npmrc to a single root file
    • Removed redundant nested .npmrc files (22.12.0) from component-library and self-service-portal
    • Updated root to 22.22.0 to align with the parent repo

Copilot AI review requested due to automatic review settings March 16, 2026 08:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the shared Dialog component in the common component library from @reach/dialog to @radix-ui/react-dialog, updating styling and dependencies across the monorepo to support the new dialog implementation.

Changes:

  • Replace @reach/dialog usage with @radix-ui/react-dialog in the component-library Dialog component.
  • Update dialog overlay styling to align with Radix’s overlay/content structure.
  • Update workspace dependencies and lockfile (including a react-dom patch bump in the self-service-portal app).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/self-service-portal/app/package.json Removes @reach/dialog from the app deps and bumps react-dom patch version.
src/common/component-library/src/components/dialog/Dialog.tsx Reimplements the dialog using Radix primitives and updates close callback typing/behavior.
src/common/component-library/src/components/dialog/Dialog.module.css Updates overlay selector and adds explicit stacking order for overlay/content.
src/common/component-library/src/components/ConfirmButton.tsx Aligns closeCallback typing with the dialog’s updated callback signature.
src/common/component-library/README.md Updates internal dependency documentation to reference Radix dialog.
src/common/component-library/package.json Swaps @reach/dialog for @radix-ui/react-dialog.
package-lock.json Reflects dependency graph changes from the dialog library swap and version updates.
Comments suppressed due to low confidence (1)

src/common/component-library/src/components/dialog/Dialog.tsx:23

  • closeDialogOnButtonClick is declared in CurityDialogProps but is not referenced anywhere in this component or elsewhere in the repo. Keeping unused props in a shared component API increases confusion for consumers—either remove it or implement the intended behavior (and add coverage) if it is still needed.
  actionButtonText?: string;
  isActionButtonDisabled?: boolean;
  closeDialogOnButtonClick?: boolean;
  actionButtonCallback?: (event: React.MouseEvent<HTMLButtonElement>) => void;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

vahag-curity and others added 3 commits March 16, 2026 10:17
…rid of all legacy-peer-deps=true in all the ui-kit projects
Wrap the title <p> with RadixDialog.Title and the subtitle <h2> with
RadixDialog.Description using asChild, so screen readers properly
announce the dialog content. Adds an empty RadixDialog.Description
when no subtitle is provided to suppress Radix accessibility warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove redundant nested .nvmrc files (22.12.0) from component-library
and self-service-portal. All engine constraints use >=22.12.0 with no
upper bounds, so 22.22.0 is compatible. This also aligns with the
parent repo's Node version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adnantariq-aurora adnantariq-aurora self-requested a review March 16, 2026 11:04
@vahag-curity vahag-curity merged commit c4c5338 into dev Mar 17, 2026
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.

6 participants