feat: share badge from the detail modal (per-badge share copy) - #2609
Conversation
Rebuild the stale badge-sharing change on the current dev tree, keep bespoke English badge copy in the canonical badge catalog, preserve localized fallbacks, and keep failed desktop shares open.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughBadge sharing now supports badge-specific English copy, localized fallback text, profile URLs, and badge codes across detail views. ChangesBadge sharing flow
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
Code-analysis diffPainscore total: 7008.7 → 7011.92 (+3.22) 🆕 New findings (17)
✅ Resolved (15)
📈 Painscore deltas (top movers)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
Treat execCommand returning false as a failed copy, clean up the temporary textarea in all paths, and keep callers open when no share mechanism succeeds.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
This supersedes #2382, rebuilt directly on the current
devtip after the original branch became 775 commits stale and conflicted with the current badge/i18n work.BADGEScatalog. The current 45-code catalog has 42 bespoke lines;CERTIFIED_YAPPER,TOKEN_NATION_SP_2026, andFESTA_JUNINA_2026intentionally use the localized generic fallback.MANICEROand correctsOFFRAMP_USERcopy for the current migration flow.ShareButtonfrom reporting success or closing its parent when clipboard copy fails and native sharing is unavailable, including the legacyexecCommand('copy') === falsepath.Risks / breaking changes
ShareButtonnow treats a failed desktop copy with no native-share support as an error instead of a false success.QA
dev: 2 commits ahead, 0 behind; GitHub reports the PR mergeable and clean.corepack pnpm typecheck— pass.git diff --check— pass.Manual verification checklist
Screenshots: NONE — the deployed
/badgesroute is auth-protected, and its web build cannot activate the native-only demo user fixture. A safe Playwright attempt therefore remained behind the auth/loading redirect before the first badge rendered. Local preview compilation was also killed by the shared host'searlyoomdaemon. The rendered modal, generated copy, successful close behavior, and failure-stays-open behavior are covered by component tests; the deployed Vercel build itself is green.