Journal Link to task: typing after a keyboard choice still appends to the title (follow-up to #480)

未关闭 适合新手
#484 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp, react
领域
frontend

调研方向

阅读 TaskTypeahead.tsx 及其测试,重点关注 handleSelect、handleKeyDown 和 handleInputChange。使用方向键和 Enter 选择一个任务,然后输入内容或按 ArrowDown,以复现问题。还要检查焦点仍在输入框中时按 Escape 的情况。当下一次按键会替换已选标题,并且 ArrowDown 会重新打开列表且标题处于选中状态时,即为完成。

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

描述

Follow-up to #480 (PR #483), found in the plan review of PR #483 and listed by the builder as a follow-up candidate. Web only (TaskFlow.Web). Not groomed yet.

Problem

#480 fixed the "Link to task" picker (TaskTypeahead) so that focusing (Tab) or clicking the input on a linked daily log row selects the prefilled title, and the first keystroke replaces it. The keyboard path after choosing a task was not covered by any acceptance criterion and still has the original bug:

  1. In the picker, choose a task with the arrow keys and Enter. handleSelect sets inputValue to '' and closes the list. Focus stays in the input, which shows the new title (displayValue is selectedTitle while closed), with nothing selected.
  2. Type 42. handleInputChange receives <title>42, so the filter is the title plus the new characters and task #42 is not found. This is the bug #480 fixed for focus and click.
  3. Or press ArrowDown instead. The list reopens with inputValue still '', so the title disappears from the input instead of being shown selected.

A mouse click at step 2 works, because #483's click path reopens the list and selects the title.

Expected

After choosing a task by keyboard, the next keystroke replaces the title, and ArrowDown reopens the list with the chosen title shown and selected. This matches what a click does after a selection.

Notes

  • Web only: TaskTypeahead.tsx (handleSelect, handleKeyDown, handleInputChange) and its tests.
  • Builds on PR #483 (#480), so it comes after that merges.
  • The builder's suggestion: on a keyboard reopen, set inputValue to selectedTitle and select it.
  • Check the same path after Escape when onEscape keeps focus in the input.
  • Minor: clicking the input first, or clearing the text, works around it.
主要语言
C#
星标
1
派生
0
平均合并
2 小时 28 分钟
30 天内合并 PR
107

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

nevridge/TaskFlow 的其他 Issue

查看 nevridge/TaskFlow 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

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