Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a next-generation web-based add form #940

Open
simonmichael opened this issue Jan 5, 2019 · 9 comments
Open

a next-generation web-based add form #940

simonmichael opened this issue Jan 5, 2019 · 9 comments
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. web The hledger-web tool.

Comments

@simonmichael
Copy link
Owner

simonmichael commented Jan 5, 2019

hledger-web's add form is not the pinnacle of usability. Here's a list of weaknesses compared with hledger-iadd, from hledger-iadd#39:

What's missing from hledger-web's add form, for hledger-iadd users ?

The auto-suggestions are the most important, imho.

Auto-suggestions.
1.1. Dates don't get auto-suggested (hleger-iadd defaults to today / yesterday for the first few hours after 00:00)
1.2. Accounts don't get auto-suggested (this is done based on past transactions with the same description, and is usually done in the same order as the previous transactions)
1.3. Amounts don't get auto-suggest (this is done based on past transactions with the same description and based on each account)

Typed suggestions / auto-complete.
2.1 In hledger-iadd, if I had a previous entry with the description "DB Ferry", that would show up as a drop-down suggestion even if I start typing "fer". In hledger-web, I need to type "db" for it to show up. This applies not just to the description field, but to all account fields as well. This is very helpful, since I don't need to type Assets:Cash, e.g., I can type start typing ca and press tab.
2.2 (non-essential) If I type 28 in the date field, then hledger-iadd auto-expands that to 2018/12/28 after I press tab, while hledger-web doesn't. This isn't essential (since hledger-web writes the full date in the journal), but expanding the date makes it easier to ensure that I haven't made a mistake in the month.
2.3 (non-essential) Any commodity amount without a specified commodity gets auto-completed (prepended) with the default commodity in hledger-iadd. And the commodity amounts are re-written with the default separators as well. While hledger-web does this as well, as with "date", it only does so in the journal, and this isn't visible on the screen. This is a nice-to-have feature.

"Add" box
3.1. In hledger-web, I need to type a and then press tab twice to get it to focus on the "date" field. In hledger-iadd, it is automatically in "date". It's quite irritating to have to type tab twice to start entering the transactions.
3.2 There is no "add" mode. I need to click on "Add transaction" after each transaction, which makes adding a bunch of transactions a pain. (Also, a small problem: Ctrl - or Ctrl + zooms out/in in both Firefox and Chromium.)
3.3. It takes around 3-4 seconds for a transaction to be added in hledger-web while it is almost instantaneous in hledger-iadd.
@simonmichael simonmichael added A-WISH Some kind of improvement request, hare-brained proposal, or plea. web The hledger-web tool. labels Jan 5, 2019
@mightybyte
Copy link

mightybyte commented Mar 3, 2019

I would like to add a vote for this general notion. I recently moved to hledger after 15 or so years of using gnucash, and I really like the simplicity and transparency. But I have to say, adding transactions is abysmal and takes me substantially longer than it did with gnucash. The main problem is that the vast majority of the transactions I add are almost complete duplicates of previous transactions, but there is no way to copy an old transaction and make small changes to it. It seems like all the effort has been focused on auto-suggestions for individual pieces of a transaction, but what I would really like is auto-suggestion of the whole template.

Here's the kind of behavior I would like. If there are only two accounts, then you should only have to type one of the amounts and the other amount should automatically be set to the corresponding negative. If there are more than two accounts, then when you make changes to an amount, no other amounts should be automatically changed. But rather, a total imbalance amount should be shown somewhere, perhaps as a tentative new account/amount entry that will automatically go away if you make other edits that bring it back into balance.

Also, you should be able to restrict the scope of the template suggestion. I'm almost always adding a group of transactions that all involve a single account. There should be a way for you to restrict the suggestions to only include transaction templates from a single account. This would dramatically reduce the noise in the suggestion process.

@simonmichael
Copy link
Owner Author

Thanks for the suggestions @mightybyte. I think it’s safe to say hledger-web has never been heavily used, certainly devs dont use it, and also the usability has fluctuated as we tweaked it over time. I think to go to the next level requires some kind of reactive front end framework.

@simonmichael
Copy link
Owner Author

hledger-web’s add form, I meant to say.

@the-solipsist
Copy link
Collaborator

Also, you should be able to restrict the scope of the template suggestion. I'm almost always adding a group of transactions that all involve a single account. There should be a way for you to restrict the suggestions to only include transaction templates from a single account. This would dramatically reduce the noise in the suggestion process.

@mightybyte, have you tried hledger-iadd? It might be what you need.

@alensiljak
Copy link

Oh, this issue sounds exactly like what I'm trying to achieve with https://cashier.alensiljak.ml/.
Having access to the actual data, i.e. asking hledger for the list of matching accounts might still be more convenient, though.

@simonmichael
Copy link
Owner Author

@mistery do you know about the web API in hledger-api and hledger-web ? See https://hledger.org/hledger-web.html#json-api, discussion.

@simonmichael
Copy link
Owner Author

PS data from demo.hledger.org is available at http://api-demo.hledger.org/api/v1/ .

@alensiljak
Copy link

alensiljak commented May 14, 2019

Oh, I did not know about the API or availability of these in -web. This offers some interesting opportunities for syncing the PWA app with the real book, i.e. via ngrok, instead of sending text files around!
Thanks for the pointers!

@the-solipsist
Copy link
Collaborator

I just wanted to note that having a better web-based add form would allow for easier mobile and remote usage of hledger as well. I recently went on an extended trip where I didn't have access to my laptop, and it would have been great to be able to use a self-hosted hledger-web instance to enter transactions from a mobile phone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. web The hledger-web tool.
Projects
None yet
Development

No branches or pull requests

4 participants