Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Keep the issue search open across sidebar polls

9f5efa3c873d1de6f58e0a12a35d3d77afa5e83e · Keenan Nemetz · 10d ago · parent bb541fde

Keep the issue search open across sidebar polls

The aside polls every 20 seconds and replaces the whole sidebar. Focus inside the aside already paused that swap, but moving focus away with a typed query left the search open to be thrown away. The poll now also waits while the search field has a value.

server/web/templates/requests.html +4−4

@@ -99,12 +99,12 @@
99 99
100 100 {{/* The whole aside is one polling unit: an approval, a finished check or a
101 101 push from elsewhere should show up without a reload. The swap skips while
102 the reader is inside the panel, so a half-made branch selection is not
103 thrown away under them. */}}
102 the reader is inside the panel or has an issue search open, so a half-made
103 branch selection or a result list is not thrown away under them. */}}
104 104 {{define "request_aside"}}
105 105 <div id="request-aside"
106 106 hx-get="/r/{{.Name}}/requests/{{.Request.ID}}/aside"
107 hx-trigger="every 20s [document.visibilityState === 'visible' &amp;&amp; (!document.activeElement || !document.activeElement.closest('#request-aside'))]"
107 hx-trigger="every 20s [document.visibilityState === 'visible' &amp;&amp; (!document.activeElement || !document.activeElement.closest('#request-aside')) &amp;&amp; !document.querySelector('#request-issue-search')?.value]"
108 108 hx-sync="this:replace"
109 109 hx-swap="outerHTML">
110 110 {{template "request_sidebar" .}}
@@ -255,7 +255,7 @@
255 255 {{if .CanEditIssues}}
256 256 <div class="request-issue-picker">
257 257 <form class="request-issue-search" hx-get="/r/{{.Name}}/requests/{{.Request.ID}}/issues/search" hx-trigger="input changed delay:250ms, search, submit" hx-target="#request-issue-results" hx-swap="innerHTML">
258 <input name="q" type="search" placeholder="Search by title, #number, or ULID" aria-label="Search issues by title, number, or ULID" autocomplete="off">
258 <input id="request-issue-search" name="q" type="search" placeholder="Search by title, #number, or ULID" aria-label="Search issues by title, number, or ULID" autocomplete="off">
259 259 </form>
260 260 <div id="request-issue-results" class="request-issue-results" aria-live="polite"></div>
261 261 </div>