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.

Title the linked issues section Issues and shrink unlink

267feec2a6089cca6532d0a3d75eaffe2ba48594 · Keenan Nemetz · 10d ago · parent 86ddbd14

Title the linked issues section Issues and shrink unlink

The section lists linked issues, so calling it Details described the shape rather than the content. Removing a link is now a small unlink icon whose accessible name still names the issue, instead of a wide Remove button beside every row.

server/issues_changes_test.go +7−7

@@ -289,7 +289,7 @@ func TestIssueAssigneesCanBeSetAndEditedInTheBrowser(t *testing.T) {
289 289 }
290 290 }
291 291
292 func TestChangeLinksIssuesFromTheDetailsSection(t *testing.T) {
292 func TestChangeLinksIssuesFromTheIssuesSection(t *testing.T) {
293 293 t.Parallel()
294 294 f := newFixture(t)
295 295 f.publish(f.repo)
@@ -333,12 +333,12 @@ func TestChangeLinksIssuesFromTheDetailsSection(t *testing.T) {
333 333 t.Fatalf("no change id in %q", resp.Header.Get("Location"))
334 334 }
335 335
336 // The Details section uses the overview's issue rows and offers the link
336 // The Issues section uses the overview's issue rows and offers the link
337 337 // controls instead of the old one-line "Closes ... when merged".
338 338 _, page := f.browserGet(t, "/r/"+f.repo+"/requests/"+id, cookie)
339 339 for _, want := range []string{
340 `id="request-details"`, "First linked issue", `value="` + first + `"`,
341 `value="add"`, `value="remove"`,
340 `id="request-issues"`, "First linked issue", `value="` + first + `"`,
341 `value="add"`, `value="remove"`, `request-unlink`,
342 342 } {
343 343 if !strings.Contains(page, want) {
344 344 t.Fatalf("the request page is missing %q:\n%s", want, page)
@@ -361,7 +361,7 @@ func TestChangeLinksIssuesFromTheDetailsSection(t *testing.T) {
361 361 resp, body = f.htmxPost(t, "/r/"+f.repo+"/requests/"+id+"/issues", cookie, url.Values{
362 362 "csrf": {sess.CSRF}, "action": {"add"}, "issue": {"#" + strconv.Itoa(number)},
363 363 })
364 if resp.StatusCode != http.StatusOK || !strings.Contains(body, `id="request-details"`) ||
364 if resp.StatusCode != http.StatusOK || !strings.Contains(body, `id="request-issues"`) ||
365 365 !strings.Contains(body, "Second linked issue") || !strings.Contains(body, "First linked issue") {
366 366 t.Fatalf("add issue response is not the expected section (%d):\n%s", resp.StatusCode, body)
367 367 }
@@ -373,7 +373,7 @@ func TestChangeLinksIssuesFromTheDetailsSection(t *testing.T) {
373 373 resp, body = f.htmxPost(t, "/r/"+f.repo+"/requests/"+id+"/issues", cookie, url.Values{
374 374 "csrf": {sess.CSRF}, "action": {"remove"}, "issue": {first},
375 375 })
376 if resp.StatusCode != http.StatusOK || !strings.Contains(body, `id="request-details"`) ||
376 if resp.StatusCode != http.StatusOK || !strings.Contains(body, `id="request-issues"`) ||
377 377 strings.Contains(body, "First linked issue") || !strings.Contains(body, "Second linked issue") {
378 378 t.Fatalf("remove issue response is not the expected section (%d):\n%s", resp.StatusCode, body)
379 379 }
@@ -401,7 +401,7 @@ func TestChangeLinksIssuesFromTheDetailsSection(t *testing.T) {
401 401 _, page = f.browserGet(t, "/r/"+f.repo+"/requests/"+id, cookie)
402 402 if !strings.Contains(page, "Second linked issue") || strings.Contains(page, `value="remove"`) ||
403 403 strings.Contains(page, `value="add"`) {
404 t.Fatalf("a closed request does not show the right Details section:\n%s", page)
404 t.Fatalf("a closed request does not show the right Issues section:\n%s", page)
405 405 }
406 406 resp, _ = f.htmxPost(t, "/r/"+f.repo+"/requests/"+id+"/issues", cookie, url.Values{
407 407 "csrf": {sess.CSRF}, "action": {"remove"}, "issue": {second},