Repository navigation
Search, filter and sort the form list - #248
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Status tabs with counts on desktop and a select on phones, four sort options with Recently edited as default, status and sort changes in the browser history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… edited Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PhilReinking
left a comment
There was a problem hiding this comment.
OK at 11a9615, CI green. One should, inline.
The 6 page tests also fail on main with $page stubbed, for the missing search, tabs and sort. Odd URL values (lists, repeats, upper case, constructor, old ?filter= and ?sort=created_at:desc) fall back before the API call, so the page only sends sort values the API accepts. "muller", "İSTANBUL", "cafe" and emoji find their forms.
|
|
||
| const text = search.toString(); | ||
| const url = `${window.location.pathname}${text ? `?${text}` : ""}`; | ||
| window.history[mode](window.history.state, "", url); |
There was a problem hiding this comment.
Should: the history entry keeps Inertia's first url ("/"). When Back reloads the page (the browser dropped its cached copy, say after a long edit), Inertia puts that url back: the list falls back to All and Recently edited, and Forward is lost. Setting the url in the copied state fixes it:
| window.history[mode](window.history.state, "", url); | |
| // Inertia reads this url when Back reloads the page | |
| const state = window.history.state && { ...window.history.state, url }; | |
| window.history[mode](state, "", url); |
There was a problem hiding this comment.
Fixed in 8016b2c with your suggestion, plus a test. Checked by hand: Back that reloads the page keeps status and sort, and Forward works.
…ame-value entries Inertia restores the url from the history state when Back reloads the page, so the copied state now carries the new url. Picking the current status or sort again adds no history entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The form list gets a search, status tabs with counts and four plain sort options. The choice lives in the URL, and the toolbar fits a phone.
Fixes BITS-255
Heads-up: old dashboard links with
?filter=now show all forms. The URL uses?status=and short sort names.Tested: Vitest (the new page tests fail on main), lint, vue-tsc, build. By hand at 1440, 1024, 800, 390 and 360 px, including Back.
Not tested: Firefox, Safari, a real phone.
Screenshots: on BITS-255.
🤖 Generated with Claude Code