Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ResponsiveModal for improved mobile experience #57

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

impruthvi
Copy link
Contributor

Responsive Modal Implementation

Summary

Implemented a ResponsiveModal component that intelligently switches between a Dialog on desktop and a Drawer on mobile devices, improving the user experience across different device sizes.

Changes

  • Replaced standard Dialog component with ResponsiveModal in DeleteUser component
  • Added proper form reset functionality when modal is closed via any method
  • Optimized event handlers with useCallback for better performance
  • Ensured consistent user experience across mobile and desktop views

Testing

  • Tested on mobile devices to verify drawer functionality
  • Tested on desktop to verify dialog functionality
  • Verified form reset works when closing via X button, Cancel button, or clicking outside

Future Improvements

  • If state persistence is needed (e.g., keeping the modal open on page refresh), we can integrate with nuqs for URL-based state management

Video

Recording.2025-02-27.221821.mp4

@tnylea
Copy link
Contributor

tnylea commented Feb 28, 2025

Looks really cool! I'll discuss this with @taylorotwell if we want to add this drawer component to the starter kit.

Tested out and it looks great 👍

@tnylea tnylea added the Additional Discussion When a PR needs a little additional discussion before merging label Feb 28, 2025
@impruthvi
Copy link
Contributor Author

Thanks so much! 🙌 Glad to hear it worked well in testing.

If you and @taylorotwell decide to include this in the starter kit, I’d be happy to refine it further or make any adjustments needed to fit the overall design approach.

Appreciate the review — looking forward to the next steps!

@impruthvi impruthvi requested a review from tnylea March 5, 2025 05:35
@johntrickett86
Copy link

@tnylea This would be great. It's something that I have been adding manually when creating a new project with the starter kit. Makes the mobile experience much better.

Copy link
Contributor

@tnylea tnylea left a comment

Choose a reason for hiding this comment

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

Great! I really like it. Approving for merge and I'll let Taylor make the final decision.

I feel that this provides a better UX 😊

@tnylea tnylea added Approved Approved for Merge and removed Additional Discussion When a PR needs a little additional discussion before merging labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Approved for Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants