Commit 191da4bb52

191da4bb528ee095de7ce47d59ee2c8e456cf483

parent: 8bae67052c

Verified · cmc ci/build: success ci/test: success ci/vuln: success

cmc <hello@cleberg.net> · 2026-09-04 01:43 UTC

web: the pin glyph is decoration, tables have headers, filters say which is current

The pin control read "black star Pin" to a screen reader; the star is
aria-hidden and the word carries the meaning. The refs and release
asset tables had no header row; both have scoped column headers. The
state filters on issues, merge requests and milestones marked the
active one by colour only; it carries aria-current now.

Ref #133

Layout: unified · split

e2e/design_test.go +2 −2
@@ -186,14 +186,14 @@ func TestWebInteractions(t *testing.T) {
186186 t.Fatal("pin toggle failed")
187187 }
188188 _, body := browserGet(t, browser, inst.base()+"/theorg/webborn")
189 if !strings.Contains(body, "★ Pinned") {
189 if !strings.Contains(body, "</span> Pinned</button>") {
190190 t.Fatal("repo header not pinned")
191191 }
192192 if _, body = browserGet(t, browser, inst.base()+"/"); !strings.Contains(body, ">theorg/</span>webborn") {
193193 t.Fatal("dashboard missing pinned repo")
194194 }
195195 browserPost(t, browser, inst.base()+"/theorg/webborn/pin", url.Values{})
196 if _, body = browserGet(t, browser, inst.base()+"/theorg/webborn"); !strings.Contains(body, "☆ Pin") {
196 if _, body = browserGet(t, browser, inst.base()+"/theorg/webborn"); !strings.Contains(body, "</span> Pin</button>") {
197197 t.Fatal("unpin failed")
198198 }
199199
internal/web/static/style.css +8
@@ -523,6 +523,14 @@ table.tree td.size { text-align: right; }
523523table.tree td.empty, table.refs td.empty, li.empty, ul.loglist li.empty { color: var(--muted); }
524524
525525/* refs page */
526table.refs th, table.assets th {
527 text-align: left;
528 font-size: var(--fs-0);
529 font-weight: 500;
530 color: var(--muted);
531 padding: var(--sp-1) var(--sp-2);
532 border-bottom: 1px solid var(--line);
533}
526534table.refs td.name { width: 100%; }
527535table.refs td.sha { color: var(--muted); }
528536
internal/web/templates/issues.html +3 −3
@@ -3,9 +3,9 @@
33<div class="listhead">
44 <h1>Issues</h1>
55 <nav class="filters">
6 <a {{if eq .State "open"}}class="active" {{end}}href="?state=open">open</a>
7 <a {{if eq .State "closed"}}class="active" {{end}}href="?state=closed">closed</a>
8 <a {{if eq .State "all"}}class="active" {{end}}href="?state=all">all</a>
6 <a {{if eq .State "open"}}class="active" aria-current="page" {{end}}href="?state=open">open</a>
7 <a {{if eq .State "closed"}}class="active" aria-current="page" {{end}}href="?state=closed">closed</a>
8 <a {{if eq .State "all"}}class="active" aria-current="page" {{end}}href="?state=all">all</a>
99 </nav>
1010 {{range .Filters}}<p class="meta">{{.Key}}: {{if eq .Key "label"}}<span class="chip label" style="{{index $.LabelColors .Value}}">{{.Value}}</span>{{else}}<b>{{.Value}}</b>{{end}} <a href="{{.Clear}}">clear</a></p>{{end}}
1111 <span class="spacer"></span>
internal/web/templates/layout.html +1 −1
@@ -59,7 +59,7 @@
5959 {{if eq .Visibility "private"}}<span class="chip">Private</span>{{end}}
6060 {{if .Settings.Archived}}<span class="chip">Archived</span>{{end}}
6161 <span class="grow"></span>
62 {{if $.Viewer}}<form method="post" action="/{{.OwnerName}}/{{.Name}}/pin" class="inline"><button type="submit" class="btn" aria-pressed="{{if field $ "Pinned"}}true{{else}}false{{end}}">{{if field $ "Pinned"}}★ Pinned{{else}}☆ Pin{{end}}</button></form>{{end}}
62 {{if $.Viewer}}<form method="post" action="/{{.OwnerName}}/{{.Name}}/pin" class="inline"><button type="submit" class="btn" aria-pressed="{{if field $ "Pinned"}}true{{else}}false{{end}}"><span aria-hidden="true">{{if field $ "Pinned"}}★{{else}}☆{{end}}</span> {{if field $ "Pinned"}}Pinned{{else}}Pin{{end}}</button></form>{{end}}
6363 </div>
6464 {{with field $ "Desc"}}<p class="repodesc">{{.}}</p>{{end}}
6565 {{with field $ "Topics"}}<p class="topics">{{range .}}<a class="chip topic" href="/explore?q={{.}}">{{.}}</a> {{end}}</p>{{end}}
internal/web/templates/milestones.html +3 −3
@@ -3,9 +3,9 @@
33<div class="listhead">
44 <h1>Milestones</h1>
55 <nav class="filters">
6 <a {{if eq .State "open"}}class="active" {{end}}href="?state=open">open</a>
7 <a {{if eq .State "closed"}}class="active" {{end}}href="?state=closed">closed</a>
8 <a {{if eq .State "all"}}class="active" {{end}}href="?state=all">all</a>
6 <a {{if eq .State "open"}}class="active" aria-current="page" {{end}}href="?state=open">open</a>
7 <a {{if eq .State "closed"}}class="active" aria-current="page" {{end}}href="?state=closed">closed</a>
8 <a {{if eq .State "all"}}class="active" aria-current="page" {{end}}href="?state=all">all</a>
99 </nav>
1010</div>
1111<ul class="milestonelist">
internal/web/templates/mrs.html +4 −4
@@ -3,10 +3,10 @@
33<div class="listhead">
44 <h1>Merge requests</h1>
55 <nav class="filters">
6 <a {{if eq .State "open"}}class="active" {{end}}href="?state=open">open</a>
7 <a {{if eq .State "merged"}}class="active" {{end}}href="?state=merged">merged</a>
8 <a {{if eq .State "closed"}}class="active" {{end}}href="?state=closed">closed</a>
9 <a {{if eq .State "all"}}class="active" {{end}}href="?state=all">all</a>
6 <a {{if eq .State "open"}}class="active" aria-current="page" {{end}}href="?state=open">open</a>
7 <a {{if eq .State "merged"}}class="active" aria-current="page" {{end}}href="?state=merged">merged</a>
8 <a {{if eq .State "closed"}}class="active" aria-current="page" {{end}}href="?state=closed">closed</a>
9 <a {{if eq .State "all"}}class="active" aria-current="page" {{end}}href="?state=all">all</a>
1010 </nav>
1111 {{range .Filters}}<p class="meta">{{.Key}}: <b>{{.Value}}</b> <a href="{{.Clear}}">clear</a></p>{{end}}
1212</div>
internal/web/templates/refs.html +2 −2
@@ -2,7 +2,7 @@
22{{define "content"}}
33<h1>Refs</h1>
44<h2>Branches</h2>
5<table class="refs">{{range .Branches}}<tr><td class="name">{{template "branchicon"}} <a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}/">{{.Name}}</a></td><td class="sha"><code>{{short .SHA}}</code></td></tr>{{else}}<tr><td class="empty">none</td></tr>{{end}}</table>
5<table class="refs"><thead><tr><th scope="col">Branch</th><th scope="col">Commit</th></tr></thead>{{range .Branches}}<tr><td class="name">{{template "branchicon"}} <a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}/">{{.Name}}</a></td><td class="sha"><code>{{short .SHA}}</code></td></tr>{{else}}<tr><td class="empty">none</td></tr>{{end}}</table>
66<h2>Tags</h2>
7<table class="refs">{{range .Tags}}<tr><td class="name"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}/">{{.Name}}</a></td><td class="sha"><code>{{short .SHA}}</code></td></tr>{{else}}<tr><td class="empty">none</td></tr>{{end}}</table>
7<table class="refs"><thead><tr><th scope="col">Tag</th><th scope="col">Commit</th></tr></thead>{{range .Tags}}<tr><td class="name"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}/">{{.Name}}</a></td><td class="sha"><code>{{short .SHA}}</code></td></tr>{{else}}<tr><td class="empty">none</td></tr>{{end}}</table>
88{{end}}
internal/web/templates/releases.html +1
@@ -33,6 +33,7 @@
3333 <p><button type="submit">Save</button></p>
3434 </form></details>{{end}}
3535 {{if $rel.Assets}}<table class="assets">
36 <thead><tr><th scope="col">File</th><th scope="col">Bytes</th><th scope="col">SHA-256</th></tr></thead>
3637 {{range $rel.Assets}}<tr>
3738 <td class="name"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/releases/download/{{$rel.Tag}}/{{.Name}}">{{.Name}}</a></td>
3839 <td class="size">{{.Size}}</td>