Skip to content

feat: Add sorting by Cost/Change column on account journal page - #2255

Merged
yagebu merged 1 commit into
beancount:mainfrom
GuanghaoYe:sort-by-change
Jul 26, 2026
Merged

feat: Add sorting by Cost/Change column on account journal page#2255
yagebu merged 1 commit into
beancount:mainfrom
GuanghaoYe:sort-by-change

Conversation

@GuanghaoYe

Copy link
Copy Markdown
Contributor

On the account journal page, the "Cost / Change" column header is now clickable to sort entries by their change amount (ascending/descending toggle). This follows the same
pattern used by the existing sortable columns (Date, Flag, Narration).

The sort arrow indicator is positioned on the left side of the header to avoid overlapping with the right-aligned numeric text.

Changes

  • frontend/src/reports/journal/sort.ts — add "change" column type and .change CSS selector
  • frontend/src/stores/journal.ts — add "change" to sort column validation
  • frontend/src/reports/journal/JournalHeaders.svelte — convert "Cost / Change" span to a sortable button with left-aligned arrow indicator

Testing

  • make lint — all checks pass
  • svelte-check — 0 errors, 0 warnings
  • Manual: verified sorting works on /edit-example/account/Expenses/

Make the "Cost / Change" column header clickable to sort journal
entries by their change amount on the account page. The sort arrow
indicator is placed on the left side to avoid overlapping with the
right-aligned numeric text.

@yagebu yagebu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this PR :)

@yagebu
yagebu merged commit b27e96e into beancount:main Jul 26, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants