Skip to content

Conversation

@joshunrau
Copy link
Collaborator

@joshunrau joshunrau commented Oct 7, 2025

remove forwardRef (deprecated in React 19) from dialog and fix some styling issue on mobile

Summary by CodeRabbit

  • Style

    • Updated Dialog styles: adjusted content size constraints, added rounded variants, refined typography classes, and lengthened overlay animation to 300ms for smoother transitions.
  • Refactor

    • Simplified Dialog subcomponents (Content, Description, Overlay, Title) for consistency by standardizing props and removing unnecessary complexity.

@joshunrau joshunrau merged commit 9e7b891 into main Oct 7, 2025
1 check passed
@coderabbitai
Copy link

coderabbitai bot commented Oct 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Ref forwarding was removed across Dialog components, converting forwardRef wrappers to plain function components. Prop typings switched to React.ComponentProps of the underlying primitives. ClassName strings were adjusted, including animation duration and styling changes in Content and Overlay, and minor class order tweaks in Title and Description.

Changes

Cohort / File(s) Summary of Changes
Dialog primitives refactoring (remove ref forwarding, update prop types)
src/components/Dialog/DialogContent.tsx, src/components/Dialog/DialogDescription.tsx, src/components/Dialog/DialogOverlay.tsx, src/components/Dialog/DialogTitle.tsx
Converted from forwardRef components to plain function components. Removed ref parameters/propagation. Updated prop typing to React.ComponentProps of the underlying Radix primitives. Public signatures changed accordingly.
Styling and timing tweaks
src/components/Dialog/DialogContent.tsx, src/components/Dialog/DialogOverlay.tsx, src/components/Dialog/DialogTitle.tsx, src/components/Dialog/DialogDescription.tsx
Content: adjusted size constraints, rounded variants, animation duration. Overlay: duration 200→300ms. Title/Description: reordered utility classes; effective styles unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

Tabs close softly, overlays glide slow,
Refs drift away where the type winds blow.
Titles stand tall, descriptions hum light,
Content rounds edges, polished just right.
Four files in step, a tidy little show.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mobile-dialog-styles

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91b42ff and 6d596c4.

📒 Files selected for processing (4)
  • src/components/Dialog/DialogContent.tsx (3 hunks)
  • src/components/Dialog/DialogDescription.tsx (1 hunks)
  • src/components/Dialog/DialogOverlay.tsx (1 hunks)
  • src/components/Dialog/DialogTitle.tsx (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Oct 7, 2025

🎉 This PR is included in version 4.8.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants