[Good first issue] 用方向键操作发现页的「更多」菜单,Esc 后回到原卡片
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, react, typescript
- Domain
- accessibility, frontend, testing
Research direction
Start with packages/ui/src/components/discover/CandidateCard.tsx around the linked menu, then read the existing menu tests in packages/ui/src/components/discover/DiscoverView.test.tsx. Run bun test packages/ui/src/components/discover/DiscoverView.test.tsx and use its test candidates to check focus movement, Escape behavior, and that mouse and keyboard activation still affect the current candidate.
Written by the indexing model from the issue text.
Description
在发现页,用键盘聚焦某个候选标的的「更多」按钮并激活。菜单展开后焦点仍在按钮上,按 ↓ 也没有移到菜单项。在离线组件中手动聚焦第一项再按 Esc,菜单会关闭,但焦点落回页面的 body,用户要重新寻找刚才的候选。候选卡菜单
用键盘走通这条路径即可验收
- 聚焦一张卡片的「更多」,用 Enter 或空格打开,焦点进入第一项。
- 用 ↑、↓ 在「对比」「自选」之间移动。按 Esc 关闭,焦点回到同一张卡片的「更多」,也没有执行任何操作。
- 鼠标点击以及键盘激活菜单项时仍对当前标的生效。可在现有发现页测试中断言
document.activeElement,使用测试候选即可。已有菜单测试
可运行 bun test packages/ui/src/components/discover/DiscoverView.test.tsx。欢迎对 React 或键盘无障碍感兴趣的朋友评论 /claim 认领。
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 37
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 26
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ydflow/Trail
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
area:evaluation bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
can1357/oh-my-pi#21349 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ohcnetwork/care_fe#17474 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 90/100