Skip to content

web: improve journal transaction tooltip alignment and metadata layout #2716

Description

@acinader

Journal transaction tool tips exposes useful metadata. The native
tooltip formatting is hard to read: tags run together, filenames
wrap into dense text, and posting accounts and amounts lose their alignment.

Reproduce

test journal

hledger-web --serve --allow=view --host=127.0.0.1 --port=8797 -f tooltip-repro.journal

http://127.0.0.1:8797/journal and hover over transactions

Eight cases

CASE01 — Basic alignment

Different account lengths should not disturb the amount column.

Before — original tooltip text

Image

After — compiled proposal

CASE01 after: basic alignment

CASE02 — Long inline metadata

Long filenames and an unbroken reference should wrap within their values, with each tag on its own row.

Before — original tooltip text

Image

After — compiled proposal

CASE02 after: long inline metadata

CASE03 — Multiline, repeated and empty tags

Both note values, the empty tag, and the final metadata marker should remain visible.

Before — original tooltip text

Image

After — compiled proposal

CASE03 after: multiline, repeated and empty tags

CASE04 — Long accounts and mixed amount widths

The long account wraps while large, small, positive and negative amounts remain aligned.

Before — original tooltip text

Image

After — compiled proposal

CASE04 after: long accounts and mixed amount widths

CASE05 — Unicode, literal markup and a URL

Unicode and the secondary date remain visible. Markup is displayed as text, and the URL is preserved.

Before — original tooltip text

Image

After — compiled proposal

CASE05 after: unicode, literal markup and a url

CASE06 — Commodity quantity and cost

The quantity, commodity, unit cost and cash amount must all remain visible, including 12.345678 FUND @ 10.00 USD.

Before — original tooltip text

Image

After — compiled proposal

CASE06 after: commodity quantity and cost

CASE07 — Posting tags and a virtual posting

Posting tags stay associated with their posting. Parentheses identify the virtual account.

Before — original tooltip text

Image

After — compiled proposal

CASE07 after: posting tags and a virtual posting

CASE08 — Thirty postings

The panel scrolls so the final cash posting and END-OF-TRANSACTION can be reached.

Before — original tooltip text

Image

After — compiled proposal

CASE08 after: thirty postings

After — scrolled to the bottom

CASE08 after: final posting and END-OF-TRANSACTION are reachable

Related: #1101 (displaying tags), #1979 (URLs and selecting tooltip text), and
#1935 (chart popup positioning). This issue focuses on the General Journal's
existing transaction tooltip.

The implementation is parked on
codex/journal-tooltip-details
for feedback. No PR has been opened.

AI disclosure: reproduction work, the local implementation/tests, and this report
were prepared with OpenAI Codex (gpt-6-astra), approximately 50k output tokens
across the work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WISHSome kind of improvement request or proposal.webThe hledger-web tool.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions