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

Aperta Adatta ai principianti
#484 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, react
Ambito
frontend

Direzione di ricerca

Leggi TaskTypeahead.tsx e i relativi test, concentrandoti su handleSelect, handleKeyDown e handleInputChange. Riproduci la selezione di un’attività con i tasti freccia e Invio, poi digita qualcosa o premi ArrowDown. Controlla anche Escape quando il focus rimane nel campo di input. Il lavoro è completato quando la pressione del tasto successivo sostituisce il titolo selezionato e ArrowDown riapre l’elenco con il titolo selezionato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
C#
Stelle
1
Fork
0
Merge medio
2h 28m
PR unite (30g)
107

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nevridge/TaskFlow

Tutte le issue di nevridge/TaskFlow

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.