Skip to content

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

Open
GuanghaoYe wants to merge 1 commit into
beancount:mainfrom
GuanghaoYe:sort-by-change
Open

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

Conversation

@GuanghaoYe

Copy link
Copy Markdown

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.
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.

1 participant