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/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

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

Put each repository tab's filters and search on one row

6c98a2711993b1fec51af785e9ad28ced0518bf3 · Keenan Nemetz · 10d ago · parent 20442b59

Put each repository tab's filters and search on one row

The filter controls had grown into two rows on the pages that also had state
chips: the chips sat above, the search and dropdowns below. Where the search sat
also depended on the page, so moving from issues to changes to code changed the
order of the same controls.

Every filter row now reads left to right: chips and labelled dropdowns on the
left, the search group on the right, with the clear action in the same right
group on pages that have no text search. The chips moved inside the form on
issues, changes and activity so a search keeps the chosen state or kind, and an
htmx swap replaces the whole row with the values the server rendered.

The row is one `.filters` element with a `.filters-search` group, so code search
and the global search page use the same shape rather than a second one. On a
phone the row stacks and the search stays on one line with its button.

server/web/templates/activity.html +10−8

@@ -15,14 +15,16 @@
15 15
16 16 {{define "activity_feed"}}
17 17 <div id="activity-feed">
18 <div class="chips" hx-boost="true" hx-target="#activity-feed" hx-swap="outerHTML" hx-push-url="true">
19 <a class="chip{{if eq .Kind ""}} active{{end}}" href="/r/{{.Name}}/activity?kind=all{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "activity"}}All</a>
20 <a class="chip{{if eq .Kind "issue"}} active{{end}}" href="/r/{{.Name}}/activity?kind=issues{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "circle-dot"}}Issues</a>
21 <a class="chip{{if eq .Kind "change"}} active{{end}}" href="/r/{{.Name}}/activity?kind=changes{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "git-pull-request"}}Changes</a>
22 <a class="chip{{if eq .Kind "release"}} active{{end}}" href="/r/{{.Name}}/activity?kind=releases{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "tag"}}Releases</a>
23 </div>
24
18 {{/* One row: kind chips and the actor/assignee pickers on the left, the clear
19 action on the right. The chips sit inside the form so a filter change
20 keeps the kind. */}}
25 21 <form class="filters" method="get" action="/r/{{.Name}}/activity" hx-get="/r/{{.Name}}/activity" hx-target="#activity-feed" hx-swap="outerHTML" hx-push-url="true">
22 <div class="chips" hx-boost="true" hx-target="#activity-feed" hx-swap="outerHTML" hx-push-url="true">
23 <a class="chip{{if eq .Kind ""}} active{{end}}" href="/r/{{.Name}}/activity?kind=all{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "activity"}}All</a>
24 <a class="chip{{if eq .Kind "issue"}} active{{end}}" href="/r/{{.Name}}/activity?kind=issues{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "circle-dot"}}Issues</a>
25 <a class="chip{{if eq .Kind "change"}} active{{end}}" href="/r/{{.Name}}/activity?kind=changes{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "git-pull-request"}}Changes</a>
26 <a class="chip{{if eq .Kind "release"}} active{{end}}" href="/r/{{.Name}}/activity?kind=releases{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "tag"}}Releases</a>
27 </div>
26 28 <input type="hidden" name="kind" value="{{.Kind}}">
27 29 <label class="filter-field">
28 30 <span class="filter-label">Actor</span>
@@ -40,7 +42,7 @@
40 42 </select>
41 43 </label>
42 44 {{end}}
43 {{if or .Actor .Assignee}}<a class="button secondary" href="/r/{{.Name}}/activity{{if .Kind}}?kind={{.Kind}}{{end}}">{{icon "x"}}Clear</a>{{end}}
45 {{if or .Actor .Assignee}}<div class="filters-search"><a class="button secondary" href="/r/{{.Name}}/activity{{if .Kind}}?kind={{.Kind}}{{end}}">{{icon "x"}}Clear</a></div>{{end}}
44 46 </form>
45 47
46 48 {{if .Events}}