feat: add bulk visibility controls to admin players page #188

Merged
forgejo_admin merged 2 commits from 111-admin-players-public into main 2026-03-29 19:20:59 +00:00
Contributor

Summary

Adds team-grouped bulk visibility toggles and public/hidden filter tabs to the admin players page, so Marcus can quickly control which players appear on the public /teams page.

Changes

  • src/routes/(app)/admin/players/+page.svelte — Added "Team Visibility" bulk action section with "Make All Public" and "Hide All" per team; added Public/Hidden filter tabs with counts; updated subtitle to show public player count; calls PATCH /admin/players/bulk-visibility for team-level operations

Test Plan

  • npm run build — success
  • npm run check — 0 errors, 7 pre-existing warnings (none from this file)
  • Manual: toggle a player public, verify /public/teams includes them
  • Manual: use "Make All Public" for a team, verify all team players show on /teams
  • Manual: use "Hide All" for a team, verify team disappears from /teams
  • Verify at 375px mobile viewport: bulk action buttons stack vertically

Review Checklist

  • No Tailwind — pure CSS vars + explicit styles
  • Dark theme consistent with existing admin pages
  • ARIA labels on all interactive elements
  • Responsive layout for mobile
  • Build passes
  • svelte-check passes
  • Depends on basketball-api#246 (adds is_public to GET /admin/players response)
## Summary Adds team-grouped bulk visibility toggles and public/hidden filter tabs to the admin players page, so Marcus can quickly control which players appear on the public /teams page. ## Changes - `src/routes/(app)/admin/players/+page.svelte` — Added "Team Visibility" bulk action section with "Make All Public" and "Hide All" per team; added Public/Hidden filter tabs with counts; updated subtitle to show public player count; calls `PATCH /admin/players/bulk-visibility` for team-level operations ## Test Plan - `npm run build` — success - `npm run check` — 0 errors, 7 pre-existing warnings (none from this file) - Manual: toggle a player public, verify /public/teams includes them - Manual: use "Make All Public" for a team, verify all team players show on /teams - Manual: use "Hide All" for a team, verify team disappears from /teams - Verify at 375px mobile viewport: bulk action buttons stack vertically ## Review Checklist - [x] No Tailwind — pure CSS vars + explicit styles - [x] Dark theme consistent with existing admin pages - [x] ARIA labels on all interactive elements - [x] Responsive layout for mobile - [x] Build passes - [x] svelte-check passes ## Related Notes - Depends on basketball-api#246 (adds is_public to GET /admin/players response) ## Related - Closes #111 - basketball-api PR: forgejo_admin/basketball-api#246
feat: add bulk visibility controls to admin players page
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
e0cf01077b
Adds team-grouped bulk toggle buttons ("Make All Public" / "Hide All")
and public/hidden filter tabs so Marcus can quickly control which
players appear on the /teams page. Individual toggles preserved.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Parents clicking the jersey email CTA were seeing a stale March 28
deadline. Updated both the jersey order page and cancel page to
reflect the actual April 10 deadline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: restore missing Paid filter tab dropped during rewrite
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ce59a69e87
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Contributor

Self-Review

Found and fixed during review:

  • The "Paid" filter tab was accidentally dropped during the page rewrite. Restored in follow-up commit ce59a69.

Changes summary:

  • Added bulkToggleTeam() function that calls PATCH /admin/players/bulk-visibility with all player IDs for a given team
  • Added "Team Visibility" section with per-team rows showing {publicCount}/{total} public and "Make All Public" / "Hide All" buttons
  • Added Public and Hidden filter tabs with live counts
  • Updated subtitle from "4 pipeline stages" to show public player count
  • Updated card-row-detail to show team_name instead of payment_method (which was never in the API response — always showed undefined)
  • Responsive: bulk action buttons stack at 480px breakpoint
  • All buttons have proper aria-label attributes
  • Buttons disable when already at target state (e.g., "Make All Public" disabled when all are already public)
  • Saving/saved/error feedback states for both individual and bulk operations

Verification:

  • npm run build — success
  • npm run check — 0 errors, 7 pre-existing warnings (none from this file)
  • No Tailwind used — pure CSS vars matching existing dark theme

Dependency: Requires basketball-api#246 to be merged first (adds is_public to GET /admin/players response). Without it, toggles render but initial state will be undefined (treated as falsy/hidden).

## Self-Review **Found and fixed during review:** - The "Paid" filter tab was accidentally dropped during the page rewrite. Restored in follow-up commit `ce59a69`. **Changes summary:** - Added `bulkToggleTeam()` function that calls `PATCH /admin/players/bulk-visibility` with all player IDs for a given team - Added "Team Visibility" section with per-team rows showing `{publicCount}/{total} public` and "Make All Public" / "Hide All" buttons - Added Public and Hidden filter tabs with live counts - Updated subtitle from `"4 pipeline stages"` to show public player count - Updated card-row-detail to show `team_name` instead of `payment_method` (which was never in the API response — always showed undefined) - Responsive: bulk action buttons stack at 480px breakpoint - All buttons have proper `aria-label` attributes - Buttons disable when already at target state (e.g., "Make All Public" disabled when all are already public) - Saving/saved/error feedback states for both individual and bulk operations **Verification:** - `npm run build` — success - `npm run check` — 0 errors, 7 pre-existing warnings (none from this file) - No Tailwind used — pure CSS vars matching existing dark theme **Dependency:** Requires basketball-api#246 to be merged first (adds `is_public` to GET /admin/players response). Without it, toggles render but initial state will be `undefined` (treated as falsy/hidden).
forgejo_admin force-pushed 111-admin-players-public from ce59a69e87
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
to 8e6bb8b889
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2026-03-29 19:05:07 +00:00
Compare
Author
Contributor

Force-pushed to clean up branch. The original branch accidentally included 2 unrelated commits from a dirty worktree (fix: update jersey deadline and feat: replace hardcoded schedule). Recreated from clean main with only the 2 relevant commits:

  • c9b37b5 feat: add bulk visibility controls to admin players page
  • 8e6bb8b fix: restore missing Paid filter tab dropped during rewrite

Diff is now 1 file, 271 lines changed. Build and svelte-check both pass clean.

Force-pushed to clean up branch. The original branch accidentally included 2 unrelated commits from a dirty worktree (`fix: update jersey deadline` and `feat: replace hardcoded schedule`). Recreated from clean main with only the 2 relevant commits: - `c9b37b5` feat: add bulk visibility controls to admin players page - `8e6bb8b` fix: restore missing Paid filter tab dropped during rewrite Diff is now 1 file, 271 lines changed. Build and svelte-check both pass clean.
forgejo_admin deleted branch 111-admin-players-public 2026-03-29 19:20:59 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/westside-app!188
No description provided.