feat(badges): add Phase 1 identity and milestone badges

未关闭
#1,951 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
64/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
冷清
技术栈
typescript
领域
full-stack

调研方向

Start in packages/api/src/lib/badges.ts and trace the existing computeBadges inputs from loadMemberDossier, then inspect HexStamp.tsx and pickFeaturedBadges for rendering and ordering. Done means all listed badge thresholds and suppression rules work without schema changes, the new glyphs match the existing visual system, and the priority order surfaces the specified milestones.

由索引模型根据 Issue 内容生成。

描述

Summary

Extend `computeBadges` with ~12 new badges derived entirely from existing data — no schema changes, no new tables, no R2 artwork. Account-anniversary, profile-completeness, identity-link, and breadth-of-craft badges that surface immediately for any active member.

Requirements

  • Anniversary 1-Year / 5-Year / 10-Year milestones from `users.createdAt`. Emit only the highest tier the user qualifies for.
  • ORCID Linked / GitHub Linked / LinkedIn Linked identity badges from non-null `profile.{orcid,githubUrl,linkedinUrl}`.
  • Profile Complete milestone — earned when displayName + headline + bio + jobTitle + institution + publicLocation are all non-empty.
  • Polyglot milestone — 5+ entries in `user_languages`.
  • Polymath milestone — 10+ entries in `user_skills`.
  • Cross-Disciplinary milestone — 3+ entries in `user_disciplines`.
  • Decade Roster milestone — 10+ event participations of any role.
  • Speaker Streak milestones — Speaker Decade (10+ talks) and Speaker Quarter (25+ talks). Suppress the lower tier when the higher is earned.
  • Globetrotter milestone — events attended in 3+ distinct countries.
  • New glyphs in `HexStamp.tsx` for each kind, geometric primitives matching the existing visual system.
  • `pickFeaturedBadges` priority updated so identity / streak / completion milestones surface in the hero strip ahead of plain attendance.

Context

`packages/api/src/lib/badges.ts` today only sees `event_attendances`, `leadership_terms`, `users.createdAt`, and `users.isLegacyImport`. This phase widens its inputs to include profile fields and discipline/skill/language counts (all already loaded by `loadMemberDossier`) without touching the schema. Phase 2 and Phase 3 follow in separate issues.

Implementation Notes

  • Identity badges (ORCID/GitHub/LinkedIn) are verification marks, not contribution marks — give them a distinct visual sub-tier so they don't compete with event chips for prestige weight.
  • Anniversary badges emit at-most-one — a 12-year member shouldn't carry 1, 5, and 10 simultaneously.
  • For the Speaker Streak threshold (10 vs 25), count distinct `event_attendances` rows with role=speaker; ignore poster-only attendances.
  • Globetrotter needs a country signal on `events.location` — if missing, use the event's joined country reference, or skip if neither is present (don't emit false positives).
主要语言
HTML
星标
33
派生
107
平均合并
14 小时 6 分钟
30 天内合并 PR
19

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

USRSE/usrse.github.io 的其他 Issue

查看 USRSE/usrse.github.io 的全部 Issue

相似的 Issue

更多 Web Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。