charmbracelet / kancli

A tutorial for building a command line kanban board in Go
183 stars 34 forks source link

feat: edit existing tasks #12

Closed stefanbildl closed 1 year ago

stefanbildl commented 1 year ago

Hi, I added the edit feature

Press e to edit an existing entry

Algorithm:

  1. User presses "e" on a task
  2. Save selected task index in model
  3. Create new form
  4. Fill title and description using selected task
  5. Run form model and wait for Task tea.Msg
  6. Do we have saved a task index? (See step 2)
    • Yes: Replace existing task with new one
    • No: It's a new task --> add to list end

Have fun trying it out!

stefanbildl commented 1 year ago

Hi @bashbunni, I fixed the merge conflicts and rebased on main.

bashbunni commented 1 year ago

@stefanbildl thank you! I'll aim to take a look this week

bashbunni commented 1 year ago

Looks good! Tested and works great. Thanks for the PR :)