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
empty table cells in multi-period balance reports [since 1.20] #1526
Comments
Forgot to mention that it's on 1.21. |
Thanks for the report. That's unfortunate! Would you be able to boil it down to an example journal ? |
I'll try, but In the event that I'm unsuccessful, will you have a way to receive the tmp.journal securely? |
I use a lot of piped
So the failure mode seems formatting related. |
There's a rather large count of digits after the decimal point for most amounts in the
|
Sure, if you have a matrix client set up, encrypted direct chat to me (simonmic:matrix.org) could be an easy way. |
I'm curious: do you still get this issue in master, or with the branch in #1509? I've put some effort into refactoring the code so this sort of bug (easy to accidentally do in the past) is less likely/impossible to do now. |
@Xitian9 tried your mixedamt branch. Same problem. I'm going to try to shrink the journal, and if not, i'll need to setup a matrix client to send @simonmichael the journal. |
Here is the smallest journal that exhibits the problem on my end:
Results in
|
Thanks! @Xitian9, I think |
Or, allow cells to grow as wide as needed ? [Start of a test:]
|
It's not clear how to elide a single amount. Here are some options:
Or, as you say, we can just ignore the maximum width if it would cause nothing to display. This might mess up alignment unless we put some extra effort into that. |
I was imagining just whatever kind of eliding we already do with too-wide amounts, even it it's not yet ideal it would be consistent. But what did 1.19 do - expand the column without limit to fit the widest amount ? That's not always super usable either but for now it's probably the most useful. Eliding can be bothersome.
|
We currently do eliding by displaying only some of the amounts in a MixedAmount; we don't ever elide the string representing a single amount. In 1.19, exactly two quantities would be displayed, with no regard for their maximum width. |
So perhaps the best option is to elide according to the previous rules, but make sure we always display at least one commodity along with an elision string, even if that would put us over the hard-coded width. That width is pretty arbitrary in any case. |
…t one amount, even if that would exceed the requested maximum width. Addresses simonmichael#1526.
Sounds pretty good.. |
…t one amount, even if that would exceed the requested maximum width. Addresses simonmichael#1526.
…t one amount, even if that would exceed the requested maximum width. Addresses #1526.
Fixed in master by #1530. |
I can confirm that it is fixed in master 0f4e462. Thanks! |
I don't understand what is going on here. The
--yearly
report has always worked for me, and that stopped recently.Now I cannot decide whether my understanding is wrong, or hledger has regressed. In any case, it is surprising.
The text was updated successfully, but these errors were encountered: