Commit Graph

288 Commits

Author SHA1 Message Date
Simon Michael
f10f9b6a17 ui: ensure more consistent quiet style in horizontal borders (#838) 2018-10-23 05:41:42 -07:00
Simon Michael
cf9eb78ad2 ui: UIUtils export list, cleanup 2018-10-23 05:21:08 -07:00
Simon Michael
74611a7be1 ui: accounts: fix balances when there's only periodic txns
And clarify multiBalanceReport.
2018-10-18 14:43:00 -07:00
Simon Michael
89a0c7a308 ui: comment 2018-10-18 14:43:00 -07:00
Simon Michael
2edb1f2705 ui: always enable periodic transactions and transaction modifiers
Rule-based transactions and postings are always generated
(--forecast and --auto are always on).
Experimental.
2018-10-18 14:43:00 -07:00
Simon Michael
b85bbbb095 ui: drop the --status-toggles flag 2018-10-18 14:43:00 -07:00
Simon Michael
a924ad047e ui: drop the --present flag 2018-10-18 14:43:00 -07:00
Simon Michael
2a44d7eb26 ui: reorganise help dialog, fit content into 80x25 again 2018-10-18 14:43:00 -07:00
Simon Michael
cf6f4ed28c ui: escape key resets to flat mode
Flat mode is the default at startup. Probably it should reset to tree
mode if --tree was used at startup.
2018-10-18 14:43:00 -07:00
Simon Michael
1b42d34a78 ui: small help tweak
[ci skip]
2018-10-18 14:43:00 -07:00
Simon Michael
52ee10bd87 ui: reg: ensure T always has a visible effect 2018-10-18 14:43:00 -07:00
Simon Michael
1c3233cc0f ui: replace odd-looking pattern 2018-10-18 14:43:00 -07:00
Simon Michael
1db9b018f1 ui: add --present/--future, hide future txns by default, toggle with F
You may have transactions dated later than today, perhaps piped from
print --forecast or recorded in the journal, which you don't want to
see except when forecasting.

By default, we now hide future transactions, showing "today's balance".
This can be toggled with the F key, which is easier than setting a
date query. --present and --future flags have been added to set the
initial mode.

(Experimental. Interactions with date queries have not been explored.)
2018-10-18 14:43:00 -07:00
Simon Michael
e52430bd62 ui: default theme: reduce highlighting noise in bottom border help 2018-10-18 14:43:00 -07:00
Simon Michael
89712fe81d ui: make flat the default, toggle with T, add --tree/-T/-F flags 2018-10-18 14:43:00 -07:00
Alex Chen
3d2584d869 lib: switch to megaparsec 7 2018-09-30 20:15:12 -06:00
Simon Michael
0f83fb91c1 ui, web: fix build after tests cleanup 2018-09-03 08:43:57 -07:00
Simon Michael
cd67f8ea68 tests: clear out old boilerplate 2018-08-31 18:12:17 -07:00
Simon Michael
d778a92561 tests: export HUnit/EasyTest from Hledger.Utils.Test; more helpers 2018-08-18 15:19:59 +01:00
Simon Michael
ea52c3d620 ui: restore support for fsnotify 0.2.1.2, as well as 0.3.x (#833)
For easier stackage entry.
2018-07-03 12:50:51 +01:00
Simon Michael
a1c0835445 ui: fix a vty version bound typo & possibly build failures (#494)
CPP intended to use old code for vty < 5.15 was always using the new code.
2018-07-03 12:38:40 +01:00
Simon Michael
236101e31a ui: support/require fsnotify 0.3.0.1+
The api has changed, it supports directory events, and might be more robust.
2018-06-05 06:41:13 -07:00
Simon Michael
061aad0431 remove some CPP that's obsolete since we require base 4.8+ 2018-06-04 17:33:21 -07:00
Aerex
5808e289e6 feat(hledger-ui): added neovim as a supported editor
when neovim is set as EDITOR hleger will jump to the correct line number of the transaction; before
hledger will open journal at top of the file
2018-06-03 17:11:43 -07:00
Alex Chen
b245ec7b3d lib: remove the megaparsec compatability module 2018-05-22 12:16:46 -07:00
Simon Michael
581d02162c resolve all current build warnings with the supported GHC versions
If I'm lucky.
2018-05-17 20:43:55 -07:00
Dmitry Astapov
d82370d10b lib, app, web: remove differences between command line and journal file aliases 2018-04-17 16:09:11 -07:00
Dmitry Astapov
f6ec26e321 lib, app, web, ui: rename readJournalFile[s]WithOpts to readJournalFile, same for tryReader[s]WithOpts 2018-04-17 15:25:02 -07:00
Dmitry Astapov
ecf49b1e4b lib: auto postings generated before amount inference and balance checks (#729) 2018-04-17 14:33:32 -07:00
Simon Michael
178e3a234b ui/web: -E toggles zeroes at startup, with opposite default to cli 2018-03-29 22:35:06 +01:00
Simon Michael
84579bb1b4 silence redundant import warnings with ghc 8.4 2018-03-24 22:51:56 +00:00
Simon Michael
0da68d2cb8 ui: fix some of the hlint warnings 2018-02-18 08:05:33 -08:00
Simon Michael
88ef586480 lib: rename, clarify purpose of balanceReportFromMultiBalanceReport 2018-01-23 11:32:24 -08:00
Simon Michael
448934d146 ui: fix manual viewing (on posix) (fix #623) 2017-12-30 12:59:31 -08:00
Simon Michael
f8e781462d ui, web: use/support new -V, --forecast, --auto 2017-12-29 16:53:37 -08:00
Simon Michael
69e255cead lib: deduplicate, refactor valuation code 2017-12-29 16:52:08 -08:00
Simon Michael
5de51c9bad fix warnings/errors found by make stacktest 2017-09-30 13:00:22 -10:00
Simon Michael
e5f794d2cb cli,ui,web: a @FILE argument reads flags & args from FILE, one per line 2017-09-30 06:49:31 -10:00
Simon Michael
fead7c5138 cli, ui, web: make -NUM a shortcut for --depth NUM 2017-09-22 16:14:30 -10:00
Simon Michael
e3c4a76119 add & use simpler readJournalFilesWithOpts/InputOpts api 2017-09-14 17:43:32 -07:00
Simon Michael
55cebad0d5 cli: refactor: move commands to a subdirectory, reinstate test command 2017-09-12 10:04:36 -07:00
Simon Michael
dc191ec76e cli: refactor: new Commands module
Builtin commands are now gathered more tightly in a single module,
Hledger.Cli.Commands, reducing duplication and facilitating change.

The tests command was difficult and has been dropped for now.

The obsolete convert/info/man commands have been dropped.

cli: refactor: a proper commands list, better Main/Commands separation

The legacy "convert" command has been dropped.

The activity command's module is now named consistently.
2017-09-11 16:50:08 -07:00
Jakub Zárybnický
13a6584440 ui, web: Enable --pivot and --anon in ui and web (#474) 2017-09-04 20:45:31 -07:00
Hans-Peter Deifel
79e3a29083 Fix build of hledger-ui with megaparsec-6 2017-08-02 11:35:23 -07:00
Simon Michael
7e896572a7 make --help and -h the same, drop --man and --info for now (#579) 2017-07-07 02:08:34 +01:00
Simon Michael
190bab5c33 ui: help: tweak key order 2017-07-06 14:11:23 +01:00
Felix Yan
ffe8b47529 Update brick to 0.19 2017-06-30 22:45:34 +01:00
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
f666d5fc25 ui: register: reduce "warping", keep selection at nearest txn
When the transaction list changes, eg due to toggling a query filter,
and the previously selected item has disappeared, instead of moving
the selection to the end, we now select the nearest transaction by
date (and if several have the same date, by journal order).
2017-06-30 19:08:51 +01:00
Simon Michael
eab17c8edb ui: transaction: don't show blanks 2017-06-30 19:07:48 +01:00
Simon Michael
8619942388 ui: toggles cleanup 2017-06-30 19:07:26 +01:00
Simon Michael
c642be7570 ui: fix right arrow key 2017-06-30 17:18:54 +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
ce0d6574e6 ui: show transaction status mark in register screen 2017-06-28 11:47:06 +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
22e751983b ui: allow multiple status filters to be active at once (#564) 2017-06-15 19:16:39 -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
eb42ea04e5 use consistent UPC order for --unmarked/--pending/--cleared (#564) 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
7fc921db86 lib, cli: -U/-P/-C flags can be combined (#564) 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
9a86c9ee52 lib: begin supporting colour
Add some basic helpers for working with ANSI colour codes,
and make strWidth and the various string layout functions aware of them.
2017-04-25 18:27:25 -07:00
Simon Michael
b402fc7e7d lib: optserror -> usageError, consolidate with other error functions (#529) 2017-03-29 08:00:51 -07:00
Simon Michael
7dd34d71b5 ui: transaction: fix pattern match failure when pressing E (fixes #508) 2017-02-05 12:00:45 -08:00
Justin Le
9d817e2d47 hledger-ui command line arguments and documentation edited to reflect new command structure (-V is global command) 2017-02-04 16:38:18 -08:00
Simon Michael
7fab8abd5d ui: fix a GenericSourcePos-related warning 2017-01-25 09:47:21 -08:00
Simon Michael
1f362101cc ui: addenda for #494 2017-01-25 09:42:10 -08:00
Peter Simons
e3d78fd0db hledger-ui: add support for brick 0.17 and vty 0.15 (#494) 2017-01-25 09:35:47 -08:00
Joshua Chia
d3883bad1f Updated hledger-ui to use brick-0.16 (#479)
brick-0.16 uses Brick.BChan.BChan instead of Control.Concurrent.Chan.Chan.
2017-01-14 10:41:46 -08:00
Simon Michael
83975d25eb ui, web: sync some things in help & manual 2017-01-05 17:09:04 -08:00
Simon Michael
5c4d6524e2 ui: drop obsolete --no-elide flag 2017-01-05 17:08:23 -08:00
Simon Michael
7ad31e65a1 ui: comment 2016-12-31 07:54:47 -08:00
Simon Michael
37632a3283 ui: small change to --watch, ignore file add/remove events 2016-12-30 20:01:34 -08: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
eac2ff0ea7 ui: make --watch work on the error screen too 2016-12-02 15:37:18 -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
1735b62011 ui: oops, watch files only with --watch flag 2016-11-25 07:02:07 -08:00
Simon Michael
3387b45a90 ui: tweak --change help 2016-11-24 20:24:07 -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
148ac4236f ui: --change shows period balances (changes) at startup 2016-11-24 11:32:13 -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
f0f4013b7a ui: use latest brick, 0.11 2016-10-27 14:15:56 -07:00
Simon Michael
1362784546 ui: help: reset wording 2016-09-05 10:57:05 -07:00
Simon Michael
8c32af581b ui: use full narrow terminal width for help dialog 2016-09-05 10:56:38 -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
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
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