-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Conversation
Looks like this PR is ready to merge! 🎉 |
|
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 64.92% 64.96% +0.03%
===========================================
Files 3100 3100
Lines 92490 92544 +54
Branches 17652 17661 +9
===========================================
+ Hits 60046 60117 +71
+ Misses 29677 29665 -12
+ Partials 2767 2762 -5
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
a200f05
to
7c119b8
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:
|
997a4bb
to
553a07d
Compare
apps/meteor/client/components/Omnichannel/hooks/useTagsList.spec.ts
Outdated
Show resolved
Hide resolved
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:
|
a82c991
to
c64c565
Compare
This PR currently has a merge conflict. Please resolve this and then re-add the |
c64c565
to
841f8ea
Compare
Proposed changes (including videos or screenshots)
This PR refactors the
useTagsList
hook to take advantage of react query's useInfiniteQuery instead ofRecordList
in combination withuseScrollableRecordList
.Issue(s)
CTZ-105
Steps to test or reproduce
Further comments
This change can be tested by visiting pages using tag autocompletes and confirming the expected behavior: fetching, filtering and lazy loading.
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.