Groups Admin UI closes #372 #382

Merged
simon merged 8 commits from feature/372-groups-management into main 2026-01-28 10:51:45 +01:00
Owner

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

Implements the Group Management UI for Issue #372. Enables administrators to fully manage groups via the web UI (create, edit, delete). Read-only users can view groups but cannot manage them. Non-admin users are redirected.

What has been changed?

New Features

  • Group Management Routes: Added slug-based routes for group management
    • GET /groups - Groups overview
    • GET /groups/new - Create new group
    • GET /groups/:slug - View group details
    • GET /groups/:slug/edit - Edit group
  • LiveView Modules: Implemented three new LiveView modules
    • GroupLive.Index - Groups overview with table (Name, Description, Member Count)
    • GroupLive.Form - Create/Edit form (only Name & Description, Slug is immutable)
    • GroupLive.Show - Detail page with member list, Edit/Delete buttons
  • Slug-based Navigation: Groups are referenced via URL-friendly slugs (not UUIDs)
  • Authorization: Implemented page permission checks for proper access control
  • Delete Confirmation: Modal with name input for confirmation before deletion
  • Member Count Display: Efficient display of member count per group (aggregate)

Definition of Done

Code Quality

  • No new technical depths
  • Linting passed (Credo warnings fixed)
  • Documentation is added where needed (code comments and docstrings present)

Accessibility

  • New elements are properly defined with html-tags
  • Colour contrast follows WCAG criteria (uses existing design system components)
  • Aria labels are added when needed
  • Everything is accessible by keyboard (uses standard button/link components)
  • Tab-Order is comprehensible
  • All interactive elements have a visible focus (uses existing button components)

Testing

  • Tests for new code are written (62 tests already present)
  • All tests pass (62 tests, 0 failures)
  • axe-core dev tools show no critical or major issues (needs manual verification)

Additional Notes

Important Implementation Details:

  • Slug-based Routes: Groups are referenced via slugs (e.g., /groups/board-members), not UUIDs
  • Case-sensitive Slugs: Slug lookups are case-sensitive (exact match required)
  • Efficient Loading: Member lists are loaded efficiently (no N+1 queries through preloading)
  • Authorization:
    • Admin: Full access (read, create, update, destroy)
    • Read-only: Read only
    • Non-admin: Redirect to /members
  • Permission Sets: Group resource has been added to all permission sets

Test Coverage:

  • 62 tests for Group Management UI
  • Tests cover: Mount, Display, Navigation, Security, Edge Cases, Performance
  • All tests use correct permission sets and fixtures

Performance:

  • Slug lookups use unique index for efficient queries
  • Member count is loaded as aggregate (no separate queries)
  • Member lists are loaded with preloading (no N+1 queries)

Gettext:

  • German translations added for all new strings
  • English translations present in template (can be added later)
## Description of the implemented changes The changes were: - [x] Bugfixing - [x] New Feature - [ ] Breaking Change - [x] Refactoring Implements the Group Management UI for Issue #372. Enables administrators to fully manage groups via the web UI (create, edit, delete). Read-only users can view groups but cannot manage them. Non-admin users are redirected. ## What has been changed? ### New Features - **Group Management Routes**: Added slug-based routes for group management - `GET /groups` - Groups overview - `GET /groups/new` - Create new group - `GET /groups/:slug` - View group details - `GET /groups/:slug/edit` - Edit group - **LiveView Modules**: Implemented three new LiveView modules - `GroupLive.Index` - Groups overview with table (Name, Description, Member Count) - `GroupLive.Form` - Create/Edit form (only Name & Description, Slug is immutable) - `GroupLive.Show` - Detail page with member list, Edit/Delete buttons - **Slug-based Navigation**: Groups are referenced via URL-friendly slugs (not UUIDs) - **Authorization**: Implemented page permission checks for proper access control - **Delete Confirmation**: Modal with name input for confirmation before deletion - **Member Count Display**: Efficient display of member count per group (aggregate) ## Definition of Done ### Code Quality - [x] No new technical depths - [x] Linting passed (Credo warnings fixed) - [x] Documentation is added where needed (code comments and docstrings present) ### Accessibility - [x] New elements are properly defined with html-tags - [x] Colour contrast follows WCAG criteria (uses existing design system components) - [x] Aria labels are added when needed - [x] Everything is accessible by keyboard (uses standard button/link components) - [x] Tab-Order is comprehensible - [x] All interactive elements have a visible focus (uses existing button components) ### Testing - [x] Tests for new code are written (62 tests already present) - [x] All tests pass (62 tests, 0 failures) - [ ] axe-core dev tools show no critical or major issues (needs manual verification) ## Additional Notes ### Important Implementation Details: - **Slug-based Routes**: Groups are referenced via slugs (e.g., `/groups/board-members`), not UUIDs - **Case-sensitive Slugs**: Slug lookups are case-sensitive (exact match required) - **Efficient Loading**: Member lists are loaded efficiently (no N+1 queries through preloading) - **Authorization**: - Admin: Full access (read, create, update, destroy) - Read-only: Read only - Non-admin: Redirect to `/members` - **Permission Sets**: `Group` resource has been added to all permission sets ### Test Coverage: - 62 tests for Group Management UI - Tests cover: Mount, Display, Navigation, Security, Edge Cases, Performance - All tests use correct permission sets and fixtures ### Performance: - Slug lookups use unique index for efficient queries - Member count is loaded as aggregate (no separate queries) - Member lists are loaded with preloading (no N+1 queries) ### Gettext: - German translations added for all new strings - English translations present in template (can be added later)
simon added 6 commits 2026-01-27 23:54:34 +01:00
test: add tdd tests for groups administration #372
Some checks failed
continuous-integration/drone/push Build is failing
f05fae3ea3
refactor: fix credo warnings, update gettext
Some checks failed
continuous-integration/drone/push Build is failing
5e0b6580ae
test: adapt tests to reflect implementation details
All checks were successful
continuous-integration/drone/push Build is passing
9991291b2f
Merge remote-tracking branch 'origin/main' into feature/372-groups-management
All checks were successful
continuous-integration/drone/push Build is passing
3eb4cde0b7
simon added 1 commit 2026-01-28 10:33:55 +01:00
refactor: improve groups LiveView based on code review feedback
All checks were successful
continuous-integration/drone/push Build is passing
ddc8335cc0
simon added 1 commit 2026-01-28 10:45:17 +01:00
fix: minor bugs
All checks were successful
continuous-integration/drone/push Build is passing
59aefe9521
simon changed title from WIP: Groups Admin UI closes #372 to Groups Admin UI closes #372 2026-01-28 10:45:42 +01:00
simon merged commit 1f8fa8a6fb into main 2026-01-28 10:51:45 +01:00
simon deleted branch feature/372-groups-management 2026-01-28 10:51:45 +01:00
Sign in to join this conversation.
No description provided.