-
Notifications
You must be signed in to change notification settings - Fork 25
fix: user group assignment options, details panel alignment #1298
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
For removing groups, only show groups the user(s) are assigned to. For adding groups for one user, only show groups the uses is not already assigned to. For multiple users, we just show all groups because computing the intersection feels a bit overkill.
8b4adca to
45fa14e
Compare
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 pull request improves user group assignment functionality by showing only relevant groups in modals and fixes UI alignment issues. The changes enhance user experience by filtering available groups based on current assignments and refactor components to use Vue 3's composition API.
- Filters group options in add/remove modals to show only relevant groups
- Fixes alignment issues in the user details panel
- Refactors components from Options API to Composition API (script setup)
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| useUserActionsRemoveFromGroups.spec.ts | Updates test cases to verify visibility only when users have group memberships |
| DetailsPanel.spec.ts | Updates tests to check DOM elements instead of component properties after refactoring |
| RemoveFromGroupsModal.spec.ts | Adds tests for filtered group options and updates existing tests for component changes |
| AddToGroupsModal.spec.ts | Adds comprehensive tests for group filtering logic across different scenarios |
| useUserActionsRemoveFromGroups.ts | Adds logic to hide action when no users have group memberships |
| DetailsPanel.vue | Refactors to script setup and fixes alignment in multiple users view |
| RemoveFromGroupsModal.vue | Refactors to script setup and adds filtering to show only assigned groups |
| AddToGroupsModal.vue | Refactors to script setup and adds filtering to show only unassigned groups for single user |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Only show relevant groups in user-group assignment. For removing groups, only show groups the user(s) are assigned to. For adding groups for one user, only show groups the uses is not already assigned to. For multiple users, we just show all groups because computing the intersection feels a bit overkill.
Also fixes the alignment in the user details panel and refactors some components to script setup.
fixes #1181