Show the app version on the About screen
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- react-native, typescript
- 领域
- mobile
调研方向
从 apps/mobile/src/app/about.tsx、apps/mobile/src/adapters/device-lab.ts 中的 appVersion() 适配器,以及 apps/mobile/src/one-turn.test.ts 中对应的测试模式开始。在两个 locale 文件中添加版本文案键,并在 apps/mobile/preview/src/stubs/adapters.ts 中添加 preview stub;更新 apps/mobile/preview/shots.mjs 中 About 的截图配置。运行列出的 mobile 和 copy 测试以及 typecheck;完成标准是 About 显示可选择的本地化版本,并且两个 locale 中都存在所请求的 Light 和 Deep sea 截图。
由索引模型根据 Issue 内容生成。
描述
Why
The bug form asks for "the version on the About screen", but About doesn't show one. Now that preview APKs are on GitHub Releases, people need it to say which build they run (ROADMAP.md, Now: preview APKs).
What to do
Today About is apps/mobile/src/app/about.tsx (copy keys HM-SET-08.*). The app's version is already read for the Device lab report by appVersion() in apps/mobile/src/adapters/device-lab.ts, from Constants.expoConfig?.version.
- Test first: add
apps/mobile/src/about-version.test.ts(node:test). It readssrc/app/about.tsxand checks that the screen shows the copy keyHM-SET-08.versionfilled withappVersion().apps/mobile/src/one-turn.test.tsreads a screen's source the same way. Watch it fail. - Add
HM-SET-08.versiontopackages/copy/locales/en.json("Version {version}") andpackages/copy/locales/es-419.json("Versión {version}"). - In
about.tsx, show it under the body text as a small, soft line, and make it selectable so people can copy it into a bug report. - The preview harness replaces everything in
src/adapterswithapps/mobile/preview/src/stubs/adapters.ts. AddappVersionthere, returning a version like "0.1.0-preview.1", so the preview still builds. - Take the screenshots. The About shot in
apps/mobile/preview/shots.mjsusesother(...), which shoots es-419 only; switch it tocore(...)for English too, or take them on a phone.
Done when
- About shows the app's version: on a dev build, the one in
apps/mobile/app.json; on a preview APK, the tag's version, which the release workflow writes intoapp.jsonbefore it builds. - The line is selectable.
- The pull request has screenshots of About in light and Deep sea, es-419 and en.
How to check
pnpm --filter @hermit/mobile test
pnpm --filter @hermit/copy test
pnpm --filter @hermit/mobile typecheck
With the preview harness (Apple silicon Mac today): cd apps/mobile/preview && pnpm build && pnpm shoot about.
Keep in mind
- The string lives in
packages/copy, in both locales, with the same{version}placeholder and no em or en dashes. - Don't import
expo-constantsin the screen. Screens get phone facts throughsrc/adapters, which the preview replaces. - The tagline, the signature and the disclaimer on About are brand lines kept as they are on purpose (see the comment at the top of
about.tsx). Leave them alone.
- 主要语言
- TypeScript
- 星标
- 11
- 派生
- 0
- 平均合并
- 10 分钟
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DojoCodingLabs/hermit 的其他 Issue
-
docs good first issue
难度 2/5 1-3 小时 新手友好度 87/100
DojoCodingLabs/hermit#73 ·
维护者通常 1 天内回复
-
device-lab
难度 2/5 1-3 小时 新手友好度 70/100
DojoCodingLabs/hermit#45 ·
维护者通常 1 天内回复
-
device-lab
难度 2/5 1-3 小时 新手友好度 62/100
DojoCodingLabs/hermit#44 ·
维护者通常 1 天内回复
-
device-lab
难度 2/5 1-3 小时 新手友好度 72/100
DojoCodingLabs/hermit#43 ·
维护者通常 1 天内回复
-
agent-friendly docs good first issue
难度 2/5 1-3 小时 新手友好度 88/100
DojoCodingLabs/hermit#39 ·
维护者通常 1 天内回复
查看 DojoCodingLabs/hermit 的全部 Issue
相似的 Issue
-
bug zoo
难度 2/5 1-3 小时 新手友好度 76/100
software-mansion/runntime#151 ·
维护者通常 4 天内回复
-
难度 1/5 1-3 小时 新手友好度 86/100
sidebandstudio/clawtrate#728 ·
维护者通常 1 天内回复
-
enhancement github_actions help wanted
难度 2/5 1-3 小时 新手友好度 78/100
tranquilo-art/tranquilo-app#254 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 88/100
Tfoucher5/fuzzy-toolkit#44 ·
维护者通常 1 天内回复
-
bug tooling
难度 2/5 1-3 小时 新手友好度 73/100
endora-commerce/endora-commerce#1978 ·
维护者通常 1 天内回复