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.

Show people as portraits in the lists and the bar

0fbeca853d0174030973a4019bd54071cafa77dd · Keenan Nemetz · 7d ago · parent aceaabbf

Show people as portraits in the lists and the bar

The account menu now carries the signed-in account's mark instead of a
generic user icon, and the issue and change tables show the person
rather than the name: the author is one portrait, and an issue's
assignees are the portraits beside it. The issue's assignee labels moved
out of the title cell, so a row is title plus people.

A table cell is the one place where the portrait is not decoration —
there is no printed name beside it — so those calls use avatarOnly: it
keeps the profile link and the aria-label, and does not hide itself from
a screen reader the way an avatar beside a name does.

The contributor list already used the shared avatar template, so it
picked up the new marks with the rest; checked in a browser rather than
assumed.

server/web/avatar.go +13

@@ -35,6 +35,10 @@ type avatarView struct {
35 35 // Initial is the fallback letter, shown until the mark is drawn.
36 36 Initial string
37 37 Href string
38 // Label is set when the avatar is the only content of its element, as in a
39 // table cell. It is decoration beside a printed name, but it is the name
40 // there, so it has to say so to a screen reader.
41 Label string
38 42 }
39 43
40 44 // avatar is the avatar for a name, on its own.
@@ -48,6 +52,15 @@ func (w *Web) avatarUser(ref userRef) avatarView {
48 52 return v
49 53 }
50 54
55 // avatarOnly is avatarUser for a place where the picture is the whole content,
56 // such as an author cell in a table. It carries the name for a screen reader
57 // instead of hiding itself the way a decorative avatar does.
58 func (w *Web) avatarOnly(ref userRef) avatarView {
59 v := w.avatarUser(ref)
60 v.Label = ref.Name
61 return v
62 }
63
51 64 // portrait derives the ground and the fallback letter from the name. SHA-256
52 65 // rather than a cheap hash so two similar names do not land on the same tone by
53 66 // construction; the mark's own variation comes from the bundle's seeded PRNG.