feat(translate): 单词交互 — hover IPA + click WordCard (PR2/4)#57
Open
bob798 wants to merge 1 commit into
Open
Conversation
- TranslateResult 接入 tokenize 分词渲染(event delegation) - Hover 100ms → IPA 浮层(sticky,pointer-events:auto) - Click/Enter/Space → 展开 WordCard(调 /articles/explain) - ipaCache + explainCache 会话级缓存 - a11y: interactive tokens 有 tabindex+role=button,focus-visible 高亮 - 触屏设备禁用 hover(@media hover:none) - 修复 usePractice 前端测试 bbc-eaw → articles/episodes 路径 Refs #43 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tokenize()分词渲染,译文中每个英文单词/CJK字符可交互/articles/explain,显示释义+例句)data-token-idx路由)ipaCache+explainCache会话级缓存,避免重复请求role=button tabindex=0,focus-visible高亮,Esc 关闭@media (hover:none)禁用 hover 高亮usePractice.spec.js路径从/bbc-eaw/episodes→/articles/episodesRefs #43
Test plan
🤖 Generated with Claude Code