Simon Michael
50efcfe359
ui: accounts: reduce "warping", select alphabetically preceding account
...
..when selected account disappears, eg when toggling zero accounts.
2017-06-30 19:45:21 +01:00
Simon Michael
8619942388
ui: toggles cleanup
2017-06-30 19:07:26 +01:00
Simon Michael
97964eb2fc
ui: consistently support vi & emacs movement keys
...
hjkl and CTRL-bfnp should now work wherever unmodified arrow keys work.
(You must still use arrow keys with SHIFT for adjusting report period).
2017-06-30 16:37:10 +01:00
Simon Michael
ef5e152fde
ui: better scrolling/positioning
...
In the accounts and register screens:, you can now scroll down further
so that the last item need not always be shown at the bottom of the screen.
Also we now try to center the selected item in the following situations:
- after moving to the end with Page down/End
- after toggling filters (status, real, historical..)
- on pressing the control-l key (should force a screen redraw, also)
- on entering the register screen from the accounts screen (there's a
known problem with this: it doesn't work the first time).
Items near the top of the list can't be centered, as we don't scroll
higher than the top of the list.
2017-06-30 15:54:30 +01:00
Simon Michael
0ccb8c0779
ui: refactor: consistent order
2017-06-28 12:54:14 +01:00
Simon Michael
59af88b796
ui: add temporary --status-toggles for testing toggle styles ( #564 )
2017-06-18 16:20:30 -07:00
Simon Michael
dcc58d4a2b
lib: rename ClearedStatus type to Status
...
(and fix hard-coded enum count)
2017-06-15 19:16:39 -07:00
Simon Michael
e119941648
rename "uncleared" status to "unmarked" and --uncleared to --unmarked ( #564 )
...
See the issue and linked mail list discussion. Ambiguity between the
uncleared state, and the "not cleared" --uncleared flag causes confusion
and friction. At this point it seems best to break with Ledger and
past hledger, pick a new name and drop --uncleared to put an end to it.
2017-06-15 19:16:39 -07:00
Simon Michael
44c6b324ab
ui: add P key to toggle pending mode ( #564 )
2017-06-15 19:16:39 -07:00
Simon Michael
31e4f538c0
ui: the A key runs hledger-iadd (if available)
2016-12-08 13:18:56 -08:00
Simon Michael
3c4cb4eeeb
ui: --watch: track date only when a standard period is in effect
2016-12-07 15:19:36 -08:00
Simon Michael
9952f93e97
ui: --watch date tracking fixes
...
- move the period only if it's "current" (contains the old "today" date)
- make it work on all screens, not just accounts
2016-12-02 15:36:23 -08:00
Simon Michael
e3a7f6697e
ui: --watch also tracks the current date, when appropriate
...
ie, when viewing a "current" period (the current day/week/month/quarter/year),
it will be moved to enclose the current date, if needed, whenever the system date changes.
2016-12-01 19:26:38 -08:00
Simon Michael
6dd406779b
ui: always reload when g is pressed
...
Previously it would check the modification time and reload only if
it looked newer than the last reload. But this could get confused
somehow by fsnotify events, such that there were unloaded changes
on disk yet pressing g did nothing.
2016-11-24 20:23:14 -08:00
Simon Michael
b09b3a7be6
ui: with --watch, react to file changes in real time
...
Experimental, tested on OSX so far.
Rapid successive file changes can cause it to get stuck.
2016-11-24 11:14:34 -08:00
Simon Michael
0f1108db07
ui: use a custom application event type
2016-11-24 09:10:50 -08:00
Simon Michael
9311077205
ui: allow brick 0.14, vty 5.12, text-zipper 0.9
2016-11-19 08:53:07 -08:00
Simon Michael
c6e2784eeb
ui: use brick 0.12, bump version to 1.0.3
2016-10-31 08:06:29 -07:00
Simon Michael
a4cf233312
ui: keep next/previous period within the journal's date span
2016-08-13 08:08:43 -07:00
Simon Michael
ef961f51ac
ui: quick help formatting fix
2016-08-12 18:06:02 -07:00
Simon Michael
4e3c0cc936
ui: historical/period toggle, help updates
...
accounts and register screens can now switch between "historical"
(default) and "period" modes
title header wording is clearer
quick help footer now indicates historical/period and tree/flat modes,
saving space in the title
help screen is more explanatory
the enter key has been reserved for later and is no longer an alias
for right/l
2016-08-12 17:44:55 -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
79cc999fa3
ui: d/u zooms report period down/up, t selects today
2016-08-09 15:31:35 -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
293b0f6705
ui: strip leading/trailing whitespace from filter query
2016-08-04 11:55:46 -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
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
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
Moritz Kiefer
991204d59a
Support vty 0.7 ( #365 )
2016-07-05 13:23:00 -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
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
cc8180b295
ui: flat mode affects register too; doc updates
2016-06-18 08:46:08 -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
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
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
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
1ed7819467
ui: very basic add command integration
2016-06-09 09:50:41 -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
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
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
9131eb7c67
ui: allow the filter query to be changed
2016-06-04 11:56:10 -07:00
Simon Michael
d1d6e237ec
ui: U key shows only uncleared transactions/postings
2016-06-03 18:32:19 -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
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
e3a55a72d9
ui: accounts: E key toggles --empty
2016-06-01 12:32:38 -07:00
Simon Michael
509f55864d
ui: indicate real mode and toggle it with R key ( #354 )
...
There is a limitation/bug: disabling real mode in the transaction screen
won't show the non-real postings if it was entered from a real-mode
register screen.
2016-06-01 12:30:39 -07:00
Simon Michael
2538d14ea7
lib: textification begins! account names
...
The first of several conversions from String to (strict) Text, hopefully
reducing space and time usage.
This one shows a small improvement, with GHC 7.10.3 and text-1.2.2.1:
hledger -f data/100x100x10.journal stats
string: <<ghc: 39471064 bytes, 77 GCs, 198421/275048 avg/max bytes residency (3 samples), 2M in use, 0.000 INIT (0.001 elapsed), 0.015 MUT (0.020 elapsed), 0.010 GC (0.014 elapsed) :ghc>>
text: <<ghc: 39268024 bytes, 77 GCs, 197018/270840 avg/max bytes residency (3 samples), 2M in use, 0.000 INIT (0.002 elapsed), 0.016 MUT (0.022 elapsed), 0.009 GC (0.011 elapsed) :ghc>>
hledger -f data/1000x100x10.journal stats
string: <<ghc: 318555920 bytes, 617 GCs, 2178997/7134472 avg/max bytes residency (7 samples), 16M in use, 0.000 INIT (0.001 elapsed), 0.129 MUT (0.136 elapsed), 0.067 GC (0.077 elapsed) :ghc>>
text: <<ghc: 314248496 bytes, 612 GCs, 2074045/6617960 avg/max bytes residency (7 samples), 16M in use, 0.000 INIT (0.003 elapsed), 0.137 MUT (0.145 elapsed), 0.067 GC (0.079 elapsed) :ghc>>
hledger -f data/10000x100x10.journal stats
string: <<ghc: 3114763608 bytes, 6026 GCs, 18858950/75552024 avg/max bytes residency (11 samples), 201M in use, 0.000 INIT (0.000 elapsed), 1.331 MUT (1.372 elapsed), 0.699 GC (0.812 elapsed) :ghc>>
text: <<ghc: 3071468920 bytes, 5968 GCs, 14120344/62951360 avg/max bytes residency (9 samples), 124M in use, 0.000 INIT (0.003 elapsed), 1.272 MUT (1.349 elapsed), 0.513 GC (0.578 elapsed) :ghc>>
hledger -f data/100000x100x10.journal stats
string: <<ghc: 31186579432 bytes, 60278 GCs, 135332581/740228992 avg/max bytes residency (13 samples), 1697M in use, 0.000 INIT (0.008 elapsed), 14.677 MUT (15.508 elapsed), 7.081 GC (8.074 elapsed) :ghc>>
text: <<ghc: 30753427672 bytes, 59763 GCs, 117595958/666457240 avg/max bytes residency (14 samples), 1588M in use, 0.000 INIT (0.008 elapsed), 13.713 MUT (13.966 elapsed), 6.220 GC (7.108 elapsed) :ghc>>
2016-05-24 19:00:49 -07:00
Simon Michael
0a90ef4658
ui: preserve --ignore-assertions & flags on reload
2016-05-02 20:12:11 -07:00
Simon Michael
f331ebec16
ui, api: switch to the quicker-building microlens
...
This may not make much difference since dependencies brick and
servant-swagger still depend on lens, but that might change.
2016-04-04 17:50:58 -07:00
Simon Michael
e061eabe2c
ui: C toggles --cleared; f -> F; UI tweaks
...
You can now toggle showing only cleared items in the accounts and
register screens, with C (like the command-line flag).
The f key has been changed to F for consistency (we don't have this as a
command-line flag, though we could, though Ledger uses it for something
different).
Screen titles have been tweaked, eg switching the cyan and yellow.
Screen help has been squeezed to fit better in 80 columns.
2015-10-30 10:42:44 -07:00
Simon Michael
68cd35c965
ui: txn: add a transaction-viewing screen
2015-10-29 17:45:57 -07:00
Simon Michael
b48ee2d22e
ui: types cleanup
2015-10-28 11:46:06 -07:00
Simon Michael
b950bd0d83
ui: reg: refactor, consolidate state
2015-10-28 11:30:56 -07:00
Simon Michael
45db0a28cc
ui: acc: preserve account selection across reloads
2015-10-28 11:13:33 -07:00
Simon Michael
423934b2b8
ui: fixups
2015-10-28 10:27:14 -07:00
Simon Michael
2515025a84
ui: pressing g once now reloads all screens
2015-10-28 10:17:15 -07:00
Simon Michael
6f85e02f1a
ui: show an error screen when reloading fails
2015-10-26 07:41:45 -07:00
Simon Michael
b64f42c2d8
bal, ui: option help tweaks
2015-10-17 11:22:39 -07:00
Simon Michael
7808c502ad
ui: accounts: wide-char-aware layout
2015-09-29 21:17:24 -10:00
Simon Michael
af33a5ac3d
ui: f key toggles flat/tree mode
2015-09-13 14:34:46 -07:00
Simon Michael
135cf714ef
ui: streamline help
2015-09-13 14:34:28 -07:00
Simon Michael
5504d70a41
ui: acc: accept = as an alias for the + key
2015-09-04 09:10:00 -07:00
Simon Michael
30cce4188f
ui: acc: g key reloads the journal
...
On the accounts screen, the g key now reloads the journal if possible.
With large journals, there may be a noticeable delay before the screen updates.
If there's a problem reading the journal file(s), this has no effect.
2015-09-04 08:14:36 -07:00
Simon Michael
a61c9ad7c4
ui: acc: don't mention included files in title
2015-09-04 07:41:07 -07:00
Simon Michael
b9affbaee9
ui: acc: show enter key in bottom help
2015-09-04 07:36:23 -07:00
Simon Michael
d83b22028b
ui: acc: show short account names in tree mode again
...
This broke for some reason.
2015-09-04 07:29:34 -07:00
Simon Michael
8685a78795
ui: acc: enter key also enters register, for now
2015-09-03 21:05:45 -07:00
Simon Michael
25a0a7c4dd
ui: make keys bold in bottom help
2015-09-03 21:03:03 -07:00
Simon Michael
ebc4022888
ui: after exiting --register, select that account
2015-09-03 20:51:05 -07:00
Simon Michael
d46f511b79
ui: allow navigating to accounts after --register
2015-09-03 20:40:43 -07:00
Simon Michael
9f2d59948e
ui: styled amounts, smarter accounts column sizing
2015-08-28 17:55:50 -07:00
Simon Michael
74512814ec
cli/ui/web: rename X.Options modules to X.XOptions
...
Make these modules' names more like the heavily-used types they
define (CliOpts, UIOpts, WebOpts). This is consistent with
RawOptions and ReportOptions, and helps with code navigation.
2015-08-28 12:43:51 -07:00
Simon Michael
8a343002f6
ui: fix vector-related breakage with GHC < 7.10
2015-08-28 11:39:23 -07:00
Simon Michael
5792c67666
ui: refactor depth key handling
2015-08-28 11:28:22 -07:00
Simon Michael
c897c03469
ui: number keys > max depth clear the depth limit
2015-08-28 10:31:40 -07:00
Simon Michael
6b17305196
ui: +/- adjusts the depth limit (accounts screen)
2015-08-28 10:01:54 -07:00
Simon Michael
eefa9c42a3
ui: remove debug code
2015-08-28 08:12:33 -07:00
Simon Michael
cc0c981d29
ui: display depth and other filters independently
...
As the comment says:
In hledger,
- reportopts{depth_} indicates --depth options
- reportopts{query_} is the query arguments as a string
- the report query is based on both of these.
For hledger-ui, currently, we move depth: arguments out of reportopts{query_}
and into reportopts{depth_}, so that depth and other kinds of filter query
can be displayed (and controlled) independently.
2015-08-28 08:07:54 -07:00
Simon Michael
d1467d7967
ui: drop unneeded args field, use opts instead
2015-08-28 06:36:07 -07:00