feat: Random picker (wheel, coin, dice, teams)

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
66/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
react, typescript, vite
领域
frontend, tooling

调研方向

Start with “Adding a tool” in docs/CODEMAP.md, then inspect src/tools/catalog.ts and src/tools/registry.tsx to follow the existing tool structure. Implement the randomness logic in src/tools/<slug>/<slug>.ts and add a Vitest test; keep the component focused on rendering. Done means the catalog and registry entries are added, the listed picker features work offline, and the UI fits light and dark modes at phone width without layout shift.

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

描述

enhancement good first issue new tool wave-4

Why

Teachers, streamers and friends deciding where to eat all use "spin the wheel" sites full of ads. Toolglass can do it with real randomness.

Replaces: wheelofnames.com, random.org list tools.

Scope

  • Spin a wheel of names, remove the winner after each spin.
  • Coin flip, dice (any count and sides), random number in a range, shuffle a list, split names into N teams.
  • Randomness from crypto.getRandomValues with rejection sampling, as AGENTS.md requires.

Dependency

None. Web APIs only (crypto.getRandomValues, canvas or SVG).

Done when

  • Logic lives in src/tools/<slug>/<slug>.ts with a Vitest test; the component only renders it.
  • One entry in src/tools/catalog.ts (category, audience, keywords, replaces) and one in src/tools/registry.tsx. See "Adding a tool" in docs/CODEMAP.md.
  • Nothing leaves the browser. It works offline once the page has loaded.
  • Works in light and dark mode and at phone width, with no layout shift when its state changes.
主要语言
TypeScript
星标
2
派生
1
平均合并
2 天 21 小时
30 天内合并 PR
7

环境准备

从这里开始

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

ajithakdev/toolglass 的其他 Issue

查看 ajithakdev/toolglass 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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