feat(search): update page results as users type #112
No reviewers
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
codefloe/forgejo-codefloe!112
Loading…
Reference in a new issue
No description provided.
Delete branch "t3code/implement-search-on-type"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Page searches on organization profiles, user repositories and stars, the watched repositories list, and Explore repositories, users, and organizations currently require submission.
Update results and pagination in place after a 300 ms typing pause, retaining input focus, filters, and a shareable query URL.
Use the existing htmx integration to show loading feedback and cancel superseded requests.
Preserve Enter/button submission and the JavaScript-free form fallback, wait for composition input, and refresh sorting and relevance links with the current query.
The htmx attributes live in
templates/shared/codefloe_search_form_attrs.tmpland the results wrapper intemplates/shared/codefloe_search_results.tmpl, so each upstream template only gains a one-line call.Only the children of the wrapper are swapped, which keeps the
aria-liveregion, the loading indicator, and an open sort dropdown intact.web_src/js/codefloe/live-search.jsmirrors the request URL into the address bar without handing history over to htmx, and falls back to a plain navigation when a response carries no results fragment.The repository administration page keeps the plain form because its table binds per-row JS handlers.
Validation: 30 Playwright checks passed on desktop and mobile Chromium against the local Forgejo test server, covering all seven live pages and the admin opt-out, the persistent live region, divider spacing, debounce timing, pagination reset, filter preservation, composition input, cancellation with an open sort menu, the no-fragment fallback, and submission without JavaScript.
Firefox could not be launched on agent-dev because host libraries are missing.
The frontend build, ESLint, stylelint, TypeScript check, and diff whitespace check also passed.
48dd0123e5fff7223a6d