-
Notifications
You must be signed in to change notification settings - Fork 190
feat(web-app-admin-settings): [OCISDEV-348] use api groups search #13235
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: master
Are you sure you want to change the base?
Conversation
This changes the search behaviour in the admin settings. Instead of filtering the groups in the client, we now use the search parameter of the list groups API endpoint.
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 server-side group search in the admin settings, replacing client-side filtering. When users search for groups, the search term is now sent directly to the API endpoint rather than filtering results in the browser.
Key changes:
- Search now uses the API's search parameter instead of client-side filtering
- Search term is stored in URL query parameters (
q_displayName) - Removed client-side filtering logic and associated footer text
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
packages/web-app-admin-settings/src/views/Groups.vue |
Added search UI components and filterGroups function to handle API-based search |
packages/web-app-admin-settings/src/components/Groups/GroupsList.vue |
Removed client-side filtering logic, converted filter input to a slot, and updated search highlighting to use query parameters |
packages/web-app-admin-settings/tests/unit/views/Groups.spec.ts |
Added test for search functionality with mocked router |
packages/web-app-admin-settings/tests/unit/components/Groups/GroupsList.spec.ts |
Added router mocks to support component changes |
changelog/unreleased/enhancement-use-api-groups-search-in-admin.md |
Documented the enhancement |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if (!unref(filterTerm)) { | ||
| return | ||
| } | ||
| unref(markInstance).mark(unref(filterTerm), { |
Copilot
AI
Oct 23, 2025
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.
The unref() call on line 316 is incorrect. filterTerm is already a string from queryItemAsString() on line 315, not a ref. Remove the unref() wrapper.
| if (!unref(filterTerm)) { | |
| return | |
| } | |
| unref(markInstance).mark(unref(filterTerm), { | |
| if (!filterTerm) { | |
| return | |
| } | |
| unref(markInstance).mark(filterTerm, { |
| <div class="oc-flex oc-flex-middle"> | ||
| <oc-text-input | ||
| id="groups-filter" | ||
| v-model.trim="filterTerm" |
Copilot
AI
Oct 23, 2025
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.
[nitpick] The v-model.trim modifier removes whitespace from the input value. However, when the search is triggered, the function uses unref(filterTerm) which will include the already-trimmed value. Consider whether .trim is necessary here or if validation should occur in the filterGroups function.
| ...unref(route), | ||
| query: { | ||
| ...omit(unref(route).query, 'q_displayName'), | ||
| q_displayName: unref(filterTerm), |
Copilot
AI
Oct 23, 2025
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.
When filterTerm is empty, this code still adds an empty q_displayName parameter to the query. This should conditionally add the parameter only when filterTerm has a value, or explicitly remove it when empty.
| q_displayName: unref(filterTerm), | |
| ...(unref(filterTerm) ? { q_displayName: unref(filterTerm) } : {}), |
|



Description
This changes the search behaviour in the admin settings. Instead of filtering the groups in the client, we now use the search parameter of the list groups API endpoint.
Motivation and Context
Leave the search to the API and don't slow down the browser.
How Has This Been Tested?
Screenshots (if appropriate):
Zaznam.obrazovky.2025-10-23.v.11.53.50.mov
Types of changes