Skip to content

Enhancement: Discord QOL — editable Player Since override + mobile rec-button spacing#485

Draft
baltinerdist wants to merge 11 commits into
amtgard:masterfrom
baltinerdist:feature/discord-qol-items-06-17
Draft

Enhancement: Discord QOL — editable Player Since override + mobile rec-button spacing#485
baltinerdist wants to merge 11 commits into
amtgard:masterfrom
baltinerdist:feature/discord-qol-items-06-17

Conversation

@baltinerdist

Copy link
Copy Markdown
Contributor

Two Discord-requested quality-of-life items.

1. Editable "Player Since" override (admin)

"Player Since" on the player profile was always computed as MIN(ork_attendance.date), so it could never predate a player's first recorded sign-in — players with incompletely-imported early attendance looked more recent than they actually were.

This adds an admin-editable override:

  • New nullable column ork_mundane.player_since_override (migration in db-migrations/). NULL/zero-date = use the computed value; a date overrides it. Mirrors the existing park_member_since override.
  • New lib resolver Player::get_player_since_date() — the override-vs-computed coalesce lives entirely in the library layer (no business logic leaks into controllers).
  • A "Player Since (override)" date field in the Update Account modal (admin-only), with a "Current first sign-in: …" hint.
  • When set, the override drives all three surfaces that read the value: the profile "Player Since" row, the Amtgard Tenure widget, and the "First sign-in at Amtgard" milestone.

Bugfixes found during end-to-end testing:

  • yapo's YapoSave silently skips null-assigned fields (isset() guard), so clearing the override never persisted. Fixed by writing the zero-date to clear (the resolver treats it as "use computed"). The same latent bug on the adjacent park_member_since clear is fixed too.
  • Added server-side checkdate() validation so a malformed/impossible date can't be stored.

Migration ordering: run the migration before deploying the code — under PDO ERRMODE_WARNING an unknown column silently rolls back the entire mundane UPDATE.

Verified end-to-end locally: set → profile shows the override; clear → reverts to computed; invalid input rejected; unrelated fields preserved.

2. More vertical space between stacked rec action buttons (mobile)

On the award-recommendations tabs (Player, Park, Kingdom), the Grant / Delete / +1 buttons stack vertically on mobile (≤768px) and sat only 5px apart, causing mis-taps. Bumped the stacked gap to 10px. Single shared .pk-rec-actions rule covers all three surfaces; desktop layout and dark mode unaffected.


Opened as a draft. Design/plan notes are included under docs/superpowers/ — happy to drop those from the PR if you'd prefer a leaner diff.

🤖 Generated with Claude Code

baltinerdist and others added 11 commits June 17, 2026 13:27
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Assigning null to a yapo property is skipped by YapoSave's isset() guard, so
the override could never be cleared. Write '0000-00-00' explicitly to clear;
get_player_since_date treats it the same as NULL (computed fallback).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… hint

- Server-side checkdate() validation on player_since_override (reject garbage/impossible dates).
- Fix the same yapo null-skip bug on park_member_since clear (was silently no-op).
- Render the 'Current first sign-in' hint as a human-readable date.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…n mobile

The Grant/Delete/+1 action buttons on the award-recommendations tabs (Player,
Park, Kingdom) stack vertically on mobile (<=768px) and sat only 5px apart,
causing mis-taps. Bump the stacked gap to 14px. Single shared .pk-rec-actions
rule covers all three surfaces.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@baltinerdist baltinerdist force-pushed the feature/discord-qol-items-06-17 branch from c544a83 to 1ca6386 Compare June 17, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant