Skip to content
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

Vertically merge cells showing account names and Total #2232

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

thielema
Copy link
Contributor

I think this is the best compromise for multibalance:

  • In HTML there is only one merged Total cell.
  • In CSV there is a Total header in every totals row.
  • In FODS the Total header is contained in every row, but only the first one is shown in a merged cell. Formulas can still access the covered Total text e.g. for VLOOKUP.

Same applies to account names in tidy layout.

@thielema thielema force-pushed the header-row-span branch 2 times, most recently from 500d3df to a98643b Compare September 15, 2024 22:03
@simonmichael
Copy link
Owner

I see there's one new commit here; maybe it also depends on #2226 ?
When you get a chance to rebase both I'll look again.

@simonmichael simonmichael added A-WISH Some kind of improvement request, hare-brained proposal, or plea. balance balancesheet incomestatement cashflow html The html output format. fods The FODS output format. labels Sep 25, 2024
@thielema
Copy link
Contributor Author

Yes, it depends on #2226. I have rebased just now.

@thielema thielema force-pushed the header-row-span branch 6 times, most recently from cf8ce94 to c7360bd Compare September 29, 2024 08:16
@simonmichael
Copy link
Owner

@thielema, what's the problem this is solving, and the visible effects ?

@thielema
Copy link
Contributor Author

thielema commented Sep 29, 2024 via email

@simonmichael
Copy link
Owner

I'm a bit lost/forgetful, so I have questions.

I cleaned up some visual glitch with html output a few months back, with 9788a06.

I think I also tweaked some row headings in csv output also, in another commit.

Perhaps we should talk about html to start with.
You're right that I haven't been thinking of it as something to be reused in other ways.
What are the changes to html output you propose, compared to 1.40 ?

@thielema
Copy link
Contributor Author

thielema commented Sep 29, 2024 via email

@simonmichael
Copy link
Owner

simonmichael commented Sep 29, 2024

Thanks, that got me closer. I'm with you now:

Screenshot 2024-09-29 at 08 27 55

becomes

Screenshot 2024-09-29 at 08 28 13

The first two column [heading]s lost their alignment, let's fix that.

@simonmichael
Copy link
Owner

And you've left csv output as-is (with the header repeated in each row, for ease of machine processing). And you've done something fancier with fods. Sounds great.

@thielema
Copy link
Contributor Author

thielema commented Sep 29, 2024 via email

…ly merge cells showing account names and Total

lib: Write.Spreadsheet: add support for cell spans
@simonmichael simonmichael merged commit 5565f11 into simonmichael:master Sep 30, 2024
1 check passed
@simonmichael
Copy link
Owner

simonmichael commented Sep 30, 2024

Looks nice - thank you.

The headings are now center aligned - it might be ok, was it intended ?

Old:

Screenshot 2024-09-29 at 20 58 52


New:

Screenshot 2024-09-29 at 21 00 01


And with --layout=bare, the commodity names are now left aligned instead of right - ok.

@thielema
Copy link
Contributor Author

thielema commented Sep 30, 2024 via email

@simonmichael
Copy link
Owner

I've seen advice that center-aligned headings are often best, but I probably preferred the content-aligned headings at some point in the past. Let's leave it for a bit and see how it feels!

@@ -376,7 +376,7 @@ compoundBalanceReportAsHtml ropts cbr =
Total simpleDateSpanCell totalrow
-- make a table of rendered lines of the report totals row
& map (map (fmap wbToText))
& zipWith (:) (Spr.defaultCell "Net:" : repeat Spr.emptyCell)
& addRowSpanHeader (Spr.defaultCell "Net:")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thielema: At some point, this cell lost its "account" class, causing "Net" to no longer be left-aligned. I didn't see how exactly to fix it myself.

Copy link
Owner

@simonmichael simonmichael Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way you may have seen this already but: adding td, th {border: thin solid red;} in a hledger.css in the current directory is quite handy for checking these HTML reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. balance balancesheet cashflow fods The FODS output format. html The html output format. incomestatement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants