Sort from the filter panel, and say which way - #286
Merged
Conversation
The table headers could already sort, but only on the six columns that happen to be on screen and only by cycling asc -> desc -> off. "Op opsteller, Z naar A" was three clicks and an invisible column. Sorting now sits in the filter popover under a rule of its own: single-choice, because the API sorts one column. Each column carries its own words for the two directions -- "nieuwste eerst" rather than "aflopend", since translating a control is how you end up clicking it twice to find out what it does. The active sort becomes a chip beside the filter chips. Same reason the filters have one: a sort that lives only inside a dropdown is a sort people forget they set. It matters more here, because Opsteller has no column in the table to hang an arrow on. Two things said out loud rather than dressed up: with no sort chosen the API keeps its own order (coalesce(update_date, create_date) DESC), and Type/Status sort on the PostgreSQL enum's declaration order -- which groups the rows but does not rank them (in report.audit_status, 'rejected' precedes 'pending_review'). Saved views now carry sort + order, so "te controleren, oudste eerst" is one saved question instead of a filter plus a setting to reapply. And the column headers start at desc like the panel does; two controls writing one piece of state should not disagree about which way the first click points. Co-Authored-By: Claude Opus 5 (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.
Sorting joins the filter popover on Rapportages. Requested because the panel is where people already go to shape the list.
What
FilterBuilder, below a hairline rule — a different verb from filtering, and single-choice, becauseGET /inquirysorts one column. Click a column to sort it descending, click it again to switch it off.nieuwste eerst / oudste eerston a date,A → Z / Z → Aon a name, rather than a shared "oplopend / aflopend" that you have to translate before you can use it. The direction row only appears once a column is picked.sortering: datum · nieuwste eerst ×). A sort that lives only inside a dropdown is a sort people forget they set — and it matters more here than for the filters, because Opsteller has no column in the table to carry an arrow.Filteren & sorteren, otherwise nobody finds it.Two things the UI says out loud
Per the honesty rules in
CLAUDE.md:coalesce(update_date, create_date) DESC. Not called "nieuwste eerst", becauseupdate_datewas bulk-stamped onto 79% of inquiries and is fiction for four rows in five.report.audit_status,rejectedprecedespending_review. The caveat renders only when one of those two is the active sort.Verification
No test runner here, so:
vue-tsc --build+ eslint clean,pnpm buildgreen, plus two throwaway harnesses (deleted before commit, per the SSR recipe inCLAUDE.md):?sort=drop%20tablefalls back to the default instead of reaching the API; a saved view keeps its sort.Not in scope
Herstel still has no sort:
GET /recoverytakesq/limit/offsetand nothing else, which is why that view has no panel at all. The fix is ~10 lines inFunderMapsApi/src/routes/recovery.tsmirroring the inquiry endpoint'sLIST_SORT_COLUMNS— happy to open that separately.🤖 Generated with Claude Code