feat(library): clickable list-view column headers for sorting (#625)#674
Open
s3ntin3l8 wants to merge 1 commit into
Open
feat(library): clickable list-view column headers for sorting (#625)#674s3ntin3l8 wants to merge 1 commit into
s3ntin3l8 wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
toggle (reuses the existing
sortKeyProxylogic, so it matches the toolbar sort).(
role="button",tabindex,:focus-visible) and exposearia-sort, matchingthe existing status-badge pattern in this view.
aria-sort.Testing
cd fe && npx vitest run src/__tests__/AudiobooksView.spec.ts— 11 passed.cd fe && npm run type-checkandnpm run lint— clean.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.