-
Notifications
You must be signed in to change notification settings - Fork 11.7k
refactor: Omnichannel's tag autocompletes to useInfiniteQuery #35874
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
base: develop
Are you sure you want to change the base?
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 |
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #35874 +/- ##
===========================================
- Coverage 61.15% 61.14% -0.01%
===========================================
Files 3009 3009
Lines 71554 71552 -2
Branches 16378 16379 +1
===========================================
- Hits 43758 43752 -6
- Misses 24830 24834 +4
Partials 2966 2966
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
e5b3a29
to
cf364fd
Compare
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
45ba893
to
a200f05
Compare
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
This pull request refactors the Omnichannel's tag autocomplete functionality in the Rocket.Chat repository. The main changes include:
New Custom Hook: Introduces a
useTagsList
hook in TypeScript using@tanstack/react-query
. This hook fetches and manages a paginated list of livechat tags from the/v1/livechat/tags
endpoint, supporting filtering by text, department, and an option to view all tags. It also handles infinite scrolling logic.Component Refactor: Updates the
AutoCompleteTagsMultiple
component to use the newuseTagsList
hook, simplifying data fetching and pagination logic. It enhances prop handling by deriving types from thePaginatedMultiSelectFiltered
component and allowing pass-through props.Department Editing Logic: Modifies the logic in the department editing form to determine unit requirements by replacing
list.itemCount
withlist.length
.These changes aim to improve the efficiency and maintainability of the tag autocomplete feature in the Omnichannel module.