hpdeifel / hledger-iadd

A terminal UI as drop-in replacement for hledger add.
BSD 3-Clause "New" or "Revised" License
77 stars 8 forks source link

Numeric input as confirmation of account suggestion #76

Open allgreed opened 1 year ago

allgreed commented 1 year ago

I still haven't got rid of this intuition after a year+ of using hledger-iadd so it might be worth considering.

Currently it's required to enter both the account and the amount as 2 separate steps.

I keep doing the following thing while entering a transaction:

  1. I accept the date
  2. I enter the description
  3. I type the amount and press enter Then I have the amount suggested as a new account and have to back up and enter the data properly.

Would it make sense to interpret input that stars with a digit on an account question as "yes, I like the suggested account name, here's the amount"? Note: if yes - a flag might be a good idea since it's perfectly possible for someone to have accounts that begin with a number

hpdeifel commented 1 year ago

I also do this from time to time, so there certainly is a bit of a UX problem. However, I'm not entirely sold on the suggested workaround.

I think the the current UI in general isn't great at communicating the current state of your q&a session. For example, I also sometimes try to type a description into the date prompt or an account name into the description field. In general, you either have to have perfect muscle memory or interpret a few spread-out clues and read text to know where you are.

A better way of presenting the current state, e.g in a WYSIWYG fashion like an HTML form or similar, would probably(hopefully) go along way to eliminate these sort of errors. However, that's of course a lot of work and might create new problems.