Skip to content

Conversation

@JammingBen
Copy link
Contributor

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

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.
@JammingBen JammingBen self-assigned this Oct 1, 2025
@JammingBen JammingBen force-pushed the fix/user-group-assignment branch from 8b4adca to 45fa14e Compare October 1, 2025 11:36
@JammingBen JammingBen marked this pull request as ready for review October 1, 2025 12:03
Copilot AI review requested due to automatic review settings October 1, 2025 12:03
Copy link
Contributor

Copilot AI left a 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.

@JammingBen JammingBen merged commit bc7c86d into main Oct 2, 2025
28 checks passed
@JammingBen JammingBen deleted the fix/user-group-assignment branch October 2, 2025 05:07
@openclouders openclouders mentioned this pull request Oct 2, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removing a user from a group lists group the user is not member of

3 participants