8000 feat(useDialog): add support for useDialog by simonguo · Pull Request #4300 · rsuite/rsuite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(useDialog): add support for useDialog #4300

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

Merged
merged 4 commits into from
May 26, 2025
Merged

Conversation

simonguo
Copy link
Member
@simonguo simonguo commented May 26, 2025

https://rsuite-nextjs-git-feature-use-dialog-hook-rsuite.vercel.app/components/use-dialog/

This pull request introduces a new useDialog React Hook and updates documentation across multiple components to improve clarity and usability. The changes include adding 8000 comprehensive documentation for useDialog, enhancing existing component documentation, and integrating the DialogContainer into the CustomProvider for dialog management.

simonguo added 3 commits May 23, 2025 17:05
- Add warning message when useToaster is used without a CustomProvider
- Add test case to verify the warning behavior
- Added descriptive text for each example in both Chinese and English
- Included notes about useToaster requiring CustomProvider
- Improved documentation clarity for Message, Notification, and Toaster components
- Implemented useDialog hook for managing dialog state
- Added Dialog and DialogContainer components
- Added documentation in both English and Chinese
- Added translations for Dialog component in all supported languages
- Added unit tests for the new functionality
Copy link
codesandbox bot commented May 26, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

8000 Copy link
vercel bot commented May 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rsuite-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 26, 2025 6:16am
rsuite-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 26, 2025 6:16am

Copy link
codesandbox-ci bot commented May 26, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@simonguo simonguo changed the title feat: add useDialog hook and Dialog component feat(useDialog): add support for useDialog May 26, 2025
@simonguo simonguo added this to the v6 milestone May 26, 2025
Copy link
codecov bot commented May 26, 2025

Codecov Report

Attention: Patch coverage is 96.77419% with 4 lines in your changes missing coverage. Please review.

Project coverage is 94.30%. Comparing base (d5d9915) to head (7a08a7a).
Report is 3 commits behind head on next.

Files with missing lines Patch % Lines
src/useDialog/DialogContainer.tsx 88.88% 3 Missing ⚠️
src/useDialog/useDialog.tsx 97.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4300      +/-   ##
==========================================
+ Coverage   94.27%   94.30%   +0.02%     
==========================================
  Files         543      546       +3     
  Lines       13266    13390     +124     
  Branches     3954     3985      +31     
==========================================
+ Hits        12507    12627     +120     
- Misses        691      695       +4     
  Partials       68       68              
Flag Coverage Δ
chromium 94.29% <96.77%> (+0.01%) ⬆️
firefox 94.30% <96.77%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Removed showCancelButton prop from Dialog component and related types
- Added internal logic to show cancel button based on dialog type (confirm/prompt)
- Updated tests to remove showCancelButton prop usage
- Simplified dialog creation in useDialog hook
@simonguo simonguo merged commit 603601f into next May 26, 2025
21 of 27 checks passed
@simonguo simonguo deleted the feature/use-dialog-hook branch May 26, 2025 06:23
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
0