-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: Adds deprecation warning on livechat:removeUnit
#37171
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
Conversation
|
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 |
🦋 Changeset detectedLatest commit: df59b13 The changes in this PR will be included in the next version bump. This PR includes changesets to release 42 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughAdds a deprecation warning to the legacy Meteor method livechat:removeUnit, refactors client deletion to use a REST DELETE endpoint via a revised useRemoveUnit hook, threads an onDelete callback through UnitEdit/UnitEditWithData, and extracts Units table row UI into a new UnitTableRow component. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant UI as UnitsTable/UnitEdit UI
participant Row as UnitTableRow
participant Hook as useRemoveUnit(id)
participant API as REST /v1/livechat/units/:id (DELETE)
participant S as Server
participant DB as Database
U->>UI: Click Delete
UI->>Row: onDelete()
Row->>Hook: invoke delete handler
Hook->>API: DELETE /v1/livechat/units/:id
API->>S: Route request
S->>DB: Remove unit by id
DB-->>S: Result
S-->>API: 200/4xx
API-->>Hook: Response
Hook->>UI: Invalidate queries, navigate
Note over S: Legacy Meteor method logs deprecation when used
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (7)
🧰 Additional context used🧬 Code graph analysis (4)apps/meteor/client/omnichannel/units/UnitTableRow.tsx (1)
apps/meteor/client/omnichannel/units/UnitEditWithData.tsx (2)
apps/meteor/client/omnichannel/units/UnitEdit.tsx (1)
apps/meteor/client/omnichannel/units/useRemoveUnit.tsx (1)
🔇 Additional comments (9)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #37171 +/- ##
===========================================
+ Coverage 67.38% 67.40% +0.02%
===========================================
Files 3287 3288 +1
Lines 111684 111688 +4
Branches 20409 20415 +6
===========================================
+ Hits 75258 75288 +30
+ Misses 33738 33716 -22
+ Partials 2688 2684 -4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
This PR adds a deprecation warning for
livechat:removeUnitlegacy meteor method. Updates client to use the endpoint instead.Issue(s)
CORE-1406
Steps to test or reproduce
Further comments
Summary by CodeRabbit
Improvements
Deprecations
Refactor