Skip to content

feat: add shareable Developer Trainer Card with clipboard export and PNG save (#260) - #341

Closed
justinjeong5 wants to merge 5 commits into
chattymin:mainfrom
justinjeong5:feat/shareable-trainer-card
Closed

justinjeong5 wants to merge 5 commits into
chattymin:mainfrom
justinjeong5:feat/shareable-trainer-card

Conversation

@justinjeong5

@justinjeong5 justinjeong5 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses #260 (Part 3) by introducing a shareable Developer Pokémon TCG Card (TrainerCardView / TrainerCardCanvasView) that combines a developer's active Pokémon companion identity with their AI coding token achievements into an authentic Pokémon Trading Card Game (TCG) card format, complete with bragging-rights killer specs.

Developers frequently want to share their Pokémon growth milestones (e.g. hatching an egg, evolving a Charizard, or celebrating a heavy coding session) with teammates on Slack/Discord or on social media without risking privacy leaks (paths, repo names, prompt text, or account emails).

Key Highlights

  • Authentic Pokémon TCG Homage: Classic vertical format (330 × 465 pt, matching 63:88 aspect ratio) with an iconic yellow outer border (#FAE138), type-driven gradient card stock, and rounded corners.
  • TCG Card Structure:
    • Top Bar: Evolution Stage pill (기본 알, 1단계, 2단계, 3단계), Pokémon name, and developer rank badge (🟣 마스터볼 개발자, 🔵 수퍼볼 개발자, etc.).
    • Illustration Window: Gold beveled frame with subtle holographic shimmer scanlines and crisp pixel sprite (@2x .interpolation(.none)), plus a shiny badge stamp when applicable.
    • Pokédex Ribbon: NO. 149 · Nature · Types · Level.
    • Core Token Metrics:
      • Today's Burn: Full formatted count (42,800,000) + prominent compact badge (42.8M).
      • Lifetime Burn: Full formatted count (1,420,000,000) + prominent compact badge (1.42B).
    • 🔥 Killer Developer Specs (2×2 Grid):
      • 🔥 Streak (연속 코딩): Consecutive active coding days (e.g. 14일 / 14d).
      • Peak Day (일일 최고): Highest single-day token burn record (e.g. 98.5M).
      • 📖 Pokédex (도감 등록): Registered species progress (48/151).
      • 👑 Hall of Fame (명예의 전당): Graduated Pokémon count (12마리 졸업), or remaining hatch tokens for eggs (10.0M tokens to hatch).
    • Collector Footer: TRAINER: {TrainerName} · ID: #{TrainerID}, SINCE {YYYY.MM}, and collector promo number ★ 048/151 PROMO.
  • 1-Click Sharing UX:
    • Copy to Clipboard ([📋 Copy]): Renders @2x Retina PNG (660 × 930 px) via SwiftUI ImageRenderer directly into NSPasteboard for immediate paste (Cmd+V) into Slack, Discord, or web browsers, accompanied by a responsive checkmark animation.
    • Save Image ([💾 Save]): Triggers native NSSavePanel to export PokeTokenCard_YYYYMMDD.png anywhere.
  • Privacy Guaranteed: Zero file paths, zero repo names, zero token transcript snippets, zero network transmission.
  • Full 7-Language Localization: Complete translations for English, Korean, Japanese, Spanish, French, Portuguese, and German.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • Other:

UI changes

Before After
No dedicated card sharing or export mechanism; users had to screenshot entire popover window which exposed internal directories or session state. Header includes a dedicated Trainer Card button (person.text.rectangle). Clicking it opens an in-popover TrainerCardView featuring a scaled preview of the authentic Pokémon TCG card homage with killer specs (Streak, Peak Day, Pokédex, Hall of Fame), editable trainer nickname, 1-click clipboard copy ([📋 Copy to Clipboard]), and PNG file saving ([💾 Save Image]).

Checklist

  • swift build and swift test pass locally
  • PR title and description are written in English
  • UI changes are described above (before/after — images optional)
  • No copyrighted assets, secrets, or private tooling references are committed (see CONTRIBUTING)
  • Tests were added or updated for this change

🤖 Generated with Antigravity 2.0 (AGY 2.0)

…PNG save (chattymin#260)

- Add TrainerCardCanvasView for rendering high-resolution (Retina @2x) retro Pokémon trainer cards combining active companion metadata and developer token statistics.
- Support 1-click clipboard PNG copying and native NSSavePanel file export.
- Include customizable trainer name, 5-digit trainer ID, species sprite, shiny badge, type badges, level/stage, and developer rank badges (Poké Ball to Champion).
- Provide complete 7-language localization (ko, en, ja, es, fr, pt, de).
- Add comprehensive unit tests covering type colors, rank tiers, image export, navigation state, and localization.
@justinjeong5
justinjeong5 marked this pull request as draft September 22, 2026 08:17
@DyRize

DyRize commented Sep 22, 2026

Copy link
Copy Markdown

Heads-up: #331 (opened Sep 18) already implements the trainer card from #260 point 3. Worth a look before both go further, happy to fold in anything from here that #331 is missing.

@justinjeong5

Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up @DyRize!

I took a look at #331 — the two-sided card layout, the team-of-six picker, and the Collection tab integration look fantastic and much more complete and polished.

I was just experimenting with some prototype card ideas here, so I am closing this draft in favor of #331. Really looking forward to seeing #331 merged into main! Rooting for your PR! 🚀


🤖 Generated with Antigravity 2.0 (AGY 2.0)

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.

2 participants