Skip to content

feat(library): clickable list-view column headers for sorting (#625)#674

Open
s3ntin3l8 wants to merge 1 commit into
Listenarrs:canaryfrom
s3ntin3l8:625-list-column-sort
Open

feat(library): clickable list-view column headers for sorting (#625)#674
s3ntin3l8 wants to merge 1 commit into
Listenarrs:canaryfrom
s3ntin3l8:625-list-column-sort

Conversation

@s3ntin3l8

Copy link
Copy Markdown
Contributor

Summary

Closes #625. In the Books list view, column headers were static — sorting was
only possible via the toolbar dropdown, unlike Sonarr/Radarr/Lidarr where you
click a header to sort. This makes the "Title / Author" and "Status" headers
clickable, with a second click reversing direction.

Changes

Added

  • Click-to-sort on the "Title / Author" and "Status" list headers, with asc/desc
    toggle (reuses the existing sortKeyProxy logic, so it matches the toolbar sort).
  • Sort-direction arrow on the active column.
  • Keyboard + ARIA support: headers are focusable and operable via Enter/Space
    (role="button", tabindex, :focus-visible) and expose aria-sort, matching
    the existing status-badge pattern in this view.
  • Unit test covering click sort, direction toggle, keyboard activation, and aria-sort.

Testing

  • cd fe && npx vitest run src/__tests__/AudiobooksView.spec.ts — 11 passed.
  • cd fe && npm run type-check and npm run lint — clean.
  • Manual: click headers to sort/reverse; Tab + Enter/Space to sort; toolbar dropdown still works.

Notes

Only Title/Author and Status are clickable, as they're the only columns with a
direct sort key — the other sort options stay in the toolbar dropdown. Scoped to
the list view; grid and grouped views are unaffected.

…istenarrs#625)

Title/Author and Status headers now sort on click, with a second click
reversing direction. Reuses the existing sortKeyProxy toggle logic;
the toolbar dropdown remains for the 7 sort keys without a dedicated column.

Headers are keyboard-accessible (role="button", tabindex, Enter/Space
handlers) and expose aria-sort, matching the existing status-badge pattern
in this view. Adds a Vitest case covering click/keyboard sort + ARIA state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@s3ntin3l8 s3ntin3l8 requested a review from a team June 10, 2026 14:59
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.

[Bug]: List view columns not clickable for sorting

1 participant