refactor(omnichannel): migrate ReturnChatQueueModal to GenericModal#38753
refactor(omnichannel): migrate ReturnChatQueueModal to GenericModal#38753Agarwalchetan wants to merge 3 commits intoRocketChat:developfrom
Conversation
Replace hand-assembled Modal, ModalHeader, ModalContent, ModalFooter layout with GenericModal component from @rocket.chat/ui-client. Resolves the TODO comment requesting this migration.
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
No actionable comments were generated in the recent review. 🎉 📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
WalkthroughReplaced a manual fuselage-based modal layout with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/meteor/client/views/omnichannel/modals/ReturnChatQueueModal.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
apps/meteor/client/views/omnichannel/modals/ReturnChatQueueModal.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: cubic · AI code reviewer
- GitHub Check: CodeQL-Build
🔇 Additional comments (1)
apps/meteor/client/views/omnichannel/modals/ReturnChatQueueModal.tsx (1)
9-25: Clean migration to GenericModal — looks good.Props are correctly mapped (
onMoveChat→onConfirm,onCancel→ bothonCancelandonClose), the warning variant is appropriate for a destructive-ish confirmation, and the body text is properly translated. This aligns well with the existing modal patterns referenced in the issue.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/meteor/client/views/omnichannel/modals/ReturnChatQueueModal.tsx`:
- Line 1: The file starts with a Unicode BOM (U+FEFF) before the import which
can break tooling; remove the BOM so the file begins directly with the import
(e.g., "import { GenericModal } from '@rocket.chat/ui-client';"), save the file
as UTF-8 without BOM, and ensure any editor/formatter or commit hook that
touches ReturnChatQueueModal.tsx preserves the no-BOM encoding.
apps/meteor/client/views/omnichannel/modals/ReturnChatQueueModal.tsx
Outdated
Show resolved
Hide resolved
Replace hand-assembled Modal, ModalHeader, ModalContent, ModalFooter layout with GenericModal component from @rocket.chat/ui-client. Resolves the TODO comment requesting this migration.
…tps://github.com/Agarwalchetan/Rocket.Chat into migrate/return-chat-queue-modal-to-generic-modal
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #38753 +/- ##
===========================================
- Coverage 70.51% 70.49% -0.02%
===========================================
Files 3176 3176
Lines 111139 111139
Branches 20050 20073 +23
===========================================
- Hits 78367 78347 -20
- Misses 30721 30749 +28
+ Partials 2051 2043 -8
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
fixes #38752 Refactor ReturnChatQueueModal to use GenericModal from @rocket.chat/ui-client
Replaces the manually assembled
Modalstructure inReturnChatQueueModalwith the sharedGenericModalcomponent from@rocket.chat/ui-client.This addresses the existing inline TODO and aligns the component with current modal patterns used elsewhere (e.g.,
CloseChatModal).Changes
Removed manual usage of:
ModalModalHeaderModalContentModalFooterModalIconModalTitleReplaced with
GenericModalMapped:
titleicononConfirmonCancelonCloseconfirmTextRemoved the TODO comment
Notes
git grep.Summary by CodeRabbit
Refactor
UI