Commit Graph

292 Commits

Author SHA1 Message Date
Simon Michael
1d6ca47536 ui: set report period from date: query args, also
date2: and --date2 might also affect it somehow, untested.
2016-08-10 10:24:43 -07:00
Simon Michael
9df96cdace ui: doc: clarify 2016-08-10 07:24:21 -07:00
Simon Michael
af9daa3b11 ui: use only shift-cursor keys for period; simplify 2016-08-10 07:17:35 -07:00
Simon Michael
fe1408485d ui: shift-left/right/up/down equivalent to p/n/u/d 2016-08-09 16:36:14 -07:00
Simon Michael
f1ac27590b doc: update generated manuals 2016-08-09 15:32:32 -07:00
Simon Michael
79cc999fa3 ui: d/u zooms report period down/up, t selects today 2016-08-09 15:31:35 -07:00
Simon Michael
8e464b6fdf pkg: move hledger-ui comment 2016-08-09 12:26:48 -07:00
Simon Michael
c3b76221d4 pkg: rename terminfo flag, drop pretty-show conditionals 2016-08-09 12:16:24 -07:00
Simon Michael
cf8ebd4ae2 pkg: rename, clean up oldtime flag 2016-08-09 12:03:23 -07:00
Simon Michael
4c313be10e reorder yaml files consistently 2016-08-09 11:39:42 -07:00
Simon Michael
570de3a0a5 format package descriptions more nicely 2016-08-09 11:29:17 -07:00
Simon Michael
11c6426834 ui: show historical balances whenever possible #392
hledger-ui now tries to show historical balances always, including
when (to limit transactions on the register screen) a report start date
is specified. This means that:

- the accounts screen balances are not disturbed by a start date

- the register screen is now a little better at showing the running
  historical balance. It's still not very good at it; some filter
  queries will cause it to fall back to showing the running total of
  visible transactions. But it's no longer disturbed by Z (nonzero mode)
  or a cur: query term.
2016-08-08 17:50:26 -07:00
Simon Michael
974b1e3be0 lib: simplify balance report types; haddocks 2016-08-08 17:23:21 -07:00
Simon Michael
7aa23f6ca2 doc: update generated manuals, and show 0.28dev there 2016-08-08 06:49:50 -07:00
Simon Michael
4e1c997965 ui: accounts: always use --no-elide for a more regular tree 2016-08-07 12:17:38 -07:00
Simon Michael
88ceb7470c ui: help: add d/n/p, move DEL/BS to bottom #381 2016-08-04 11:55:46 -07:00
Simon Michael
293b0f6705 ui: strip leading/trailing whitespace from filter query 2016-08-04 11:55:46 -07:00
Simon Michael
2bee53af96 doc: updated generated manuals 2016-08-02 12:55:14 -07:00
Simon Michael
07d0ec4534 doc: expand date:, link it from hledger-ui manual 2016-08-02 12:54:16 -07:00
Simon Michael
3c724efe4f ui: d cycles report duration, n/p steps to next/prev period (#381) 2016-08-02 08:24:04 -07:00
Simon Michael
0cb5703ad1 ui: refactor draw functions 2016-08-02 08:24:04 -07:00
Simon Michael
fe6d4cc7da lib: abstract period/interval/cleared in ReportOpts 2016-07-29 19:20:56 -07:00
Simon Michael
b7071dee84 lib: use Data.Default directly, not via cmdargs 2016-07-29 10:15:48 -07:00
Moritz Kiefer
4141067428 Replace Parsec with Megaparsec (see #289) (#366)
* Replace Parsec with Megaparsec (see #289)

This builds upon PR #289 by @rasendubi

* Revert renaming of parseWithState to parseWithCtx

* Fix doctests

* Update for Megaparsec 5

* Specialize parser to improve performance

* Pretty print errors

* Swap StateT and ParsecT

This is necessary to get the correct backtracking behavior, i.e. discard
state changes if the parsing fails.
2016-07-29 08:57:10 -07:00
Simon Michael
90c0d40777 lib, ui, web: more careful dates in account transactions report/registers
Clarify the account transactions report, and don't change original transactions' dates.

Show a more accurate date in hledger-ui and hledger-web's account registers
when postings have their own dates. This is now called the "transaction register date":
the date which is displayed for that transaction in a register for some current account
and filter query. It is either the transaction date from the journal ("transaction general date"),
or if postings to the current account and matched by the register's filter query have
their own dates, the earliest of those dates.
2016-07-27 12:12:42 -07:00
Simon Michael
ffb40870ce ui: register: be inclusive for a depth-clipped account, matching displayed balance
And drop F key from register screen again.
2016-07-26 17:28:29 -07:00
Simon Michael
9b0cadc179 ui: support/require brick 0.7+ #379 2016-07-24 18:06:49 -07:00
Simon Michael
b91877fd72 ui: one more try, forgot about the package.yaml #376 2016-07-23 10:41:26 -07:00
Simon Michael
d037989355 ui: try hiding problem deps on windows as well #376 2016-07-23 09:22:58 -07:00
Simon Michael
34f4dc9dcd ui: don't attempt to build hledger-ui on windows #376 2016-07-22 12:30:12 -07:00
Simon Michael
9ccd4e226f doc: update generated manuals 2016-07-06 15:17:09 -07:00
Simon Michael
7eeb5e01ee ui: I toggles balance assertions
This was a bit tricky.
2016-07-06 15:08:57 -07:00
Simon Michael
19fc5b61f7 ui: indicate when balance assertions are ignored
The indication takes up lots of space, may need refinement.
It's currently not shown on the error screen.
2016-07-06 15:07:27 -07:00
Simon Michael
347e9dc701 ui: clarify and refine journal reloading a bit
The CLI options saved in the UI state are not updated if reloading fails.
(I didn't need this change after all, but it seems reasonable.)

Reloading on the error screen just updates the message, rather than
entering a new error screen.

Docs have been clarified.
2016-07-06 14:58:55 -07:00
Simon Michael
9a7fe756b9 ui: help: tweak direction key help 2016-07-06 14:51:26 -07:00
Simon Michael
427953728e ui: doc: note movement speed / keyboard repeat rate linkage 2016-07-05 14:07:14 -07:00
Moritz Kiefer
991204d59a Support vty 0.7 (#365) 2016-07-05 13:23:00 -07:00
Simon Michael
b9d8c15014 ui: doc: clarify which editors support positioning 2016-06-24 19:27:57 -07:00
Simon Michael
aff8b98ce5 ui: doc: link to edit keys supported in minibuffer 2016-06-24 19:22:28 -07:00
Simon Michael
dbeb4e3020 ui: add vi-style movement keys, use ? for help (#357) 2016-06-24 18:54:54 -07:00
Simon Michael
529d55dd54 ui: doc: document E key 2016-06-20 11:15:09 -07:00
Simon Michael
7a4c45aa4a ui: basic manual integration 2016-06-20 11:09:12 -07:00
Simon Michael
76519be8f9 ui: advertise E key on transaction, error screens 2016-06-20 11:08:23 -07:00
Simon Michael
1d419eb7e6 ui: editor: jump to current txn or error location (emacs, emacsclient, vi) 2016-06-19 16:15:17 -07:00
Simon Michael
c79750bafd ui: editor: cleanup, vi support, positioning support 2016-06-19 14:09:49 -07:00
Simon Michael
4923efefb9 ui: basic editor integration
The E key (on all screens) edits the main journal file using
$HLEDGER_UI_EDITOR or $EDITOR or "emacs -nw",
jumping to the end if it's Emacs.
2016-06-19 09:00:04 -07:00
Simon Michael
c4b3a4f996 ui: use Z instead of E for nonzero mode
Breaking consistency with hledger cli flags, but I think it's
more mnemonic, and E will more useful for something else.
2016-06-18 09:00:38 -07:00
Simon Michael
b017426812 ui: use same filter style for depth limit 2016-06-18 08:53:59 -07:00
Simon Michael
cc8180b295 ui: flat mode affects register too; doc updates 2016-06-18 08:46:08 -07:00
Simon Michael
c26178acdd ui: reg: select latest txn by default again 2016-06-18 07:31:09 -07:00
Simon Michael
3cc0173094 ui: remove obsolete comment from package.yaml 2016-06-12 16:44:53 -07:00
Mitchell Rosen
42e7a2c32c Use hpack in hledger-ui (#356) 2016-06-12 16:02:44 -07:00
Simon Michael
d4343f8de1 ui: at depth 0 call account "All" (and fix register) 2016-06-12 11:09:59 -07:00
Simon Michael
aa871c8074 ui: doc: register: filtering by acct does work 2016-06-12 10:47:35 -07:00
Simon Michael
68a1a8687a doc: generate really plain text manuals
Drop the nice ansi highlighting that won't work everywhere,
the unpredictable unicode hyphens, etc.
2016-06-11 21:34:20 -07:00
Simon Michael
060e89d3ee doc: ui: small update 2016-06-11 21:29:08 -07:00
Simon Michael
b4cbd16e52 ui: doc: build latest depth limit doc 2016-06-10 19:49:13 -07:00
Simon Michael
bdb36b8480 ui: refactor: events, imports cleanup 2016-06-10 17:54:46 -07:00
Simon Michael
47a8eb53c8 ui: refactor: AppState -> UIState, cleanups 2016-06-10 17:54:46 -07:00
Simon Michael
0851851ea9 ui: refactor: drop Vty. prefix 2016-06-10 16:39:06 -07:00
Simon Michael
9ba8465421 ui: accounts: fix an earlier refactoring, helping selection persistence 2016-06-10 16:21:43 -07:00
Simon Michael
8b9f5e1cdf ui: 0 now limits depth to 0 instead of resetting it 2016-06-10 12:51:10 -07:00
Simon Michael
dc6f39a859 ui: doc: latest keys 2016-06-10 12:12:45 -07:00
Simon Michael
ea180f72a0 ui: briefer on-screen help, and a more detailed help dialog 2016-06-10 11:50:57 -07:00
Simon Michael
aa75cc69f6 ui: a more general mode mechanism 2016-06-10 08:40:00 -07:00
Simon Michael
e6769b26fc doc: more macros, less redundancy, cleanups 2016-06-09 18:07:08 -07:00
Simon Michael
499f249157 ui: clear screen before add 2016-06-09 12:42:47 -07:00
Simon Michael
6c6222ef85 ui: import Lens.Micro.Platform more correctly 2016-06-09 12:41:26 -07:00
Simon Michael
a70eca8e01 ui: doc: a key runs add 2016-06-09 09:56:36 -07:00
Simon Michael
a6d859c273 ui: comments 2016-06-09 09:51:15 -07:00
Simon Michael
1ed7819467 ui: very basic add command integration 2016-06-09 09:50:41 -07:00
Simon Michael
7f26f991ba ui, api: fix/update microlens, microlens-platform dependency 2016-06-09 09:49:16 -07:00
Simon Michael
8bda78a447 ui: refactor, simplify, flatten screen types 2016-06-09 07:47:48 -07:00
Simon Michael
e6b1d2d5a7 ui: preliminary lensification, just the accounts screen state
Experimenting with lenses to reduce record accessing/updating noise.
So far, it's not at all a clear win.
cf https://github.com/jtdaugherty/brick/issues/62
2016-06-08 15:47:53 -07:00
Simon Michael
5c657dbd81 ui: switch to the more complete microlens-platform 2016-06-08 15:44:08 -07:00
Simon Michael
5c343a5848 ui: convert screen states to records
This is highly verbose, but potentially clearer, allows better haddock docs, and hopefully will improve after lensification.
2016-06-08 12:15:58 -07:00
Simon Michael
5259605e82 ui: simplify screen naming & importing 2016-06-08 11:03:49 -07:00
Simon Michael
70d596fb38 ui: extract journal reloading 2016-06-08 10:48:34 -07:00
Simon Michael
1e93feeff3 ui: distinguish regenerateScreens from journal reloading 2016-06-08 10:42:51 -07:00
Simon Michael
bfae74a18b ui: doc: fix filter query link 2016-06-07 09:41:36 -07:00
Simon Michael
4d62ac5efc ui: document latest keys 2016-06-07 09:38:31 -07:00
Simon Michael
bbcbaf6080 ui: Esc (outside minibuffer) resets, jumps to top 2016-06-07 09:26:16 -07:00
Simon Michael
c6313ebf8c ui: use / to filter; backspace/delete clears it
I was planning to use this for search, but I can't help it, my hands
want to use / to adjust the filter.
2016-06-07 09:23:36 -07:00
Simon Michael
4b68675ce5 ui: txn: show current query affecting txn list 2016-06-07 09:20:20 -07:00
Simon Michael
7a951a8dd7 ui: cleanup, haddocks 2016-06-07 09:03:59 -07:00
Simon Michael
9131eb7c67 ui: allow the filter query to be changed 2016-06-04 11:56:10 -07:00
Simon Michael
606036e1a2 ui: consistent -V description in short help 2016-06-03 18:41:12 -07:00
Simon Michael
d1d6e237ec ui: U key shows only uncleared transactions/postings 2016-06-03 18:32:19 -07:00
Simon Michael
3b24c15813 ui: transaction: show when empty/cleared/real are affecting the txn list 2016-06-03 18:00:38 -07:00
Simon Michael
9e42e231c7 ui: accounts, register: more stable scroll position after E/C/R 2016-06-03 17:53:49 -07:00
Simon Michael
4ab1536ea0 ui: accounts: hold selection better during F toggle 2016-06-03 16:31:53 -07:00
Simon Michael
ddf18060ab ui: register: keep scroll position more stable when toggling E 2016-06-03 16:07:37 -07:00
Simon Michael
fa59fd27ee ui: register: fix zero txn toggling, and maintain selection 2016-06-03 12:56:22 -07:00
Simon Michael
7338543699 doc: ui: document new keys 2016-06-03 10:22:04 -07:00
Simon Michael
8986a8d3a0 doc: fix pivot option formatting, whitespace 2016-06-03 09:50:01 -07:00
Simon Michael
f21e9d1c25 doc: more deduplication of options help
Help for reporting options is now also defined once in lib.m4
(in addition to CliOptions.hs). Also fixed some duplication of general
options in docs. hledger-* manuals now include the full list of general
and reporting options; we assume that any inapplicable options get
harmlessly ignored and that this will not surprise users.
2016-06-03 09:38:06 -07:00
Simon Michael
16bb17fbe8 ui: show nonzero (empty) mode, turn it off by default
-E/--empty is now the default for hledger-ui, so accounts with 0 balance
and transactions posting 0 change are shown by default.  The E key
toggles this, entering "nonzero" mode which hides zero items.
2016-06-03 09:01:54 -07:00
Simon Michael
2c8b47b293 ui: register: E key toggles zero-amount txns 2016-06-03 08:57:38 -07:00
Simon Michael
cc67aeba8d ui: fix some warnings (#354) 2016-06-02 18:13:07 -07:00
Simon Michael
7c8d7e9820 ui: transaction: ignore real/cleared/empty, always show full txn (#354)
This commit clarifies the account transactions report: as before the included transactions
are the original unfiltered transactions, but now the change and running balance amounts
are calculated from the report-matched postings. This fixed the limitation noted in 509f558,
so that toggling real mode in any screen could work. Then I decided the transaction screen
shouldn't show a partial transaction after all, so real/cleared filtering is no longer allowed or indicated here.
2016-06-02 07:03:00 -07:00