-
Notifications
You must be signed in to change notification settings - Fork 739
feat: implement API cache for the project groups page #3036
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
Open
Sameh16
wants to merge
13
commits into
main
Choose a base branch
from
CM-2228
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+519
−247
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Added @tanstack/vue-query and its devtools to the project. - Implemented VueQuery in main application file for global state management. - Updated project groups table to utilize pagination and infinite scrolling with VueQuery. - Refactored project groups page to use VueQuery for data fetching and state management. - Created segments service to handle API requests for project groups. - Introduced TanstackKey enum for query keys to maintain consistency. Signed-off-by: Sameh16 <[email protected]>
…Fn for improved query handling Signed-off-by: Sameh16 <[email protected]>
Signed-off-by: Sameh16 <[email protected]>
…jectGroupsQueryFn for clarity Signed-off-by: Sameh16 <[email protected]>
…ject groups page Signed-off-by: Sameh16 <[email protected]>
Signed-off-by: Sameh16 <[email protected]>
…LoadMore function Signed-off-by: Sameh16 <[email protected]>
… in project group form Signed-off-by: Sameh16 <[email protected]>
…oup form logic Signed-off-by: Sameh16 <[email protected]>
…component Signed-off-by: Sameh16 <[email protected]>
…component Signed-off-by: Sameh16 <[email protected]>
Signed-off-by: Sameh16 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements API caching for the project groups page by integrating Tanstack Query with Vue Query and refactoring related services and components. Key changes include:
- Introducing a new TanstackKey enum for query keys.
- Refactoring the SegmentsService and various component pages/forms to use useInfiniteQuery, useMutation, and proper query keys.
- Integrating VueQueryDevtools and configuring the VueQueryPlugin with a QueryClient in main.ts.
Reviewed Changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
frontend/src/shared/types/tanstack.ts | Added a new enum for caching keys. |
frontend/src/modules/lf/segments/segments.service.ts | Updated service methods to support new query patterns. |
frontend/src/modules/admin/modules/projects/pages/project-groups.page.vue | Refactored querying logic using useInfiniteQuery and updated conditional rendering. |
frontend/src/modules/admin/modules/projects/components/view/lf-project-groups-table.vue | Adjusted table data sourcing from the updated pagination structure. |
frontend/src/modules/admin/modules/projects/components/form/lf-project-group-form.vue | Refactored query and mutation logic in the project group form. |
frontend/src/modules/admin/modules/projects/components/form/lf-project-form.vue | Updated query keys and mutation logic in the project form. |
frontend/src/main.ts | Installed VueQueryPlugin with proper QueryClient configuration. |
frontend/src/app.vue | Integrated VueQueryDevtools into the main application layout. |
Files not reviewed (2)
- frontend/package-lock.json: Language not supported
- frontend/package.json: Language not supported
frontend/src/modules/admin/modules/projects/components/form/lf-project-group-form.vue
Show resolved
Hide resolved
frontend/src/modules/admin/modules/projects/components/form/lf-project-form.vue
Show resolved
Hide resolved
gaspergrom
approved these changes
May 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed ✍️
What
copilot:summary
copilot:poem
Why
How
copilot:walkthrough
Checklist ✅
Feature
,Improvement
, orBug
.