bradyt / cone

A ledger.
https://cone.tangential.info
20 stars 5 forks source link

Copy existing transaction to data entry form #64

Open bradyt opened 4 years ago

bradyt commented 4 years ago

I think this is ready, implemented and working, but filing the issue for visibility, and as a point of reference, as I haven't deployed it yet. Commit is on master branch, at https://github.com/bradyt/cone/commit/d91cf74b03432fc3c6a6521f5327d7a2aebb34e1.

In the version of cone after current, v0.2.20+28, there will be a new feature where if you tap on a transaction, the add button becomes a copy button. Pressing it will open the data entry form, pre-populated with the contents of the selected transaction.

          child: (store.state.transactionIndex == -1)
              ? const Icon(Icons.add)
              : const Icon(Icons.content_copy),

The pre-populated values actually appear as hintText, so that you can start typing a new value without needing to delete the current one, but maybe that is a strange idiom, and really we just need to add a clear button for text fields.

The idea was inspired in discussion on IRC, with hledger author, where I was trying to brainstorm on how to implement a way to add entries faster, such as described in the recently filed template issue. At one point, they mentioned a lot of their faster transaction adding is just copying previous transactions in their editor. And so that inspired this copy feature.

The great thing about a copy feature, is it starts to approximate templates, editing, deleting, without adding any state to the app. The UI is just a function of your ledger file.

bhankas commented 3 years ago

Hi, if the feature is working, can we have another release tag? There hasn't been new release in over a year and half. While the app works well, it'll be nice to have thus feature on f-droid releases.

bradyt commented 2 years ago

Unfortunately, I don't have an estimate on whether or not the copy feature will be in the next or a future release, nor when the next release will be.