loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(ui): use right placeholder string in milestones search (#4628)

This PR fixes a wrong placeholder for the search for milestones. I tested it locally (see attachments, below).

Before: https://codeberg.org/attachments/ba845ce1-1f20-4131-a74d-7220986a4acf
After: https://codeberg.org/attachments/0c4e32ee-b1a8-4472-837d-daa2a2a50121

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4628
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>

authored by

Robert Wolff
Robert Wolff
and committed by
0ko
0a74c95b 56dbe326

+65
+1
options/locale/locale_en-US.ini
··· 182 182 runner_kind = Search runners... 183 183 no_results = No matching results found. 184 184 issue_kind = Search issues... 185 + milestone_kind = Search milestones... 185 186 pull_kind = Search pulls... 186 187 keyword_search_unavailable = Searching by keyword is currently not available. Please contact the site administrator. 187 188
+2
templates/repo/issue/search.tmpl
··· 11 11 {{end}} 12 12 {{if .PageIsPullList}} 13 13 {{template "shared/search/combo_fuzzy" dict "Value" .Keyword "IsFuzzy" .IsFuzzy "Placeholder" (ctx.Locale.Tr "search.pull_kind") "Tooltip" (ctx.Locale.Tr "explore.go_to")}} 14 + {{else if .PageIsMilestones}} 15 + {{template "shared/search/combo_fuzzy" dict "Value" .Keyword "IsFuzzy" .IsFuzzy "Placeholder" (ctx.Locale.Tr "search.milestone_kind") "Tooltip" (ctx.Locale.Tr "explore.go_to")}} 14 16 {{else}} 15 17 {{template "shared/search/combo_fuzzy" dict "Value" .Keyword "IsFuzzy" .IsFuzzy "Placeholder" (ctx.Locale.Tr "search.issue_kind") "Tooltip" (ctx.Locale.Tr "explore.go_to")}} 16 18 {{end}}
+12
tests/integration/issue_test.go
··· 70 70 MakeRequest(t, req, http.StatusOK) 71 71 } 72 72 73 + func TestViewIssues(t *testing.T) { 74 + defer tests.PrepareTestEnv(t)() 75 + 76 + req := NewRequest(t, "GET", "/user2/repo1/issues") 77 + resp := MakeRequest(t, req, http.StatusOK) 78 + 79 + htmlDoc := NewHTMLParser(t, resp.Body) 80 + search := htmlDoc.doc.Find(".list-header-search > .search > .input > input") 81 + placeholder, _ := search.Attr("placeholder") 82 + assert.Equal(t, "Search issues...", placeholder) 83 + } 84 + 73 85 func TestViewIssuesSortByType(t *testing.T) { 74 86 defer tests.PrepareTestEnv(t)() 75 87
+25
tests/integration/milestone_test.go
··· 1 + // Copyright 2024 The Forgejo Authors. All rights reserved. 2 + // SPDX-License-Identifier: MIT 3 + 4 + package integration 5 + 6 + import ( 7 + "net/http" 8 + "testing" 9 + 10 + "code.gitea.io/gitea/tests" 11 + 12 + "github.com/stretchr/testify/assert" 13 + ) 14 + 15 + func TestViewMilestones(t *testing.T) { 16 + defer tests.PrepareTestEnv(t)() 17 + 18 + req := NewRequest(t, "GET", "/user2/repo1/milestones") 19 + resp := MakeRequest(t, req, http.StatusOK) 20 + 21 + htmlDoc := NewHTMLParser(t, resp.Body) 22 + search := htmlDoc.doc.Find(".list-header-search > .search > .input > input") 23 + placeholder, _ := search.Attr("placeholder") 24 + assert.Equal(t, "Search milestones...", placeholder) 25 + }
+25
tests/integration/pull_test.go
··· 1 + // Copyright 2024 The Forgejo Authors. All rights reserved. 2 + // SPDX-License-Identifier: MIT 3 + 4 + package integration 5 + 6 + import ( 7 + "net/http" 8 + "testing" 9 + 10 + "code.gitea.io/gitea/tests" 11 + 12 + "github.com/stretchr/testify/assert" 13 + ) 14 + 15 + func TestViewPulls(t *testing.T) { 16 + defer tests.PrepareTestEnv(t)() 17 + 18 + req := NewRequest(t, "GET", "/user2/repo1/pulls") 19 + resp := MakeRequest(t, req, http.StatusOK) 20 + 21 + htmlDoc := NewHTMLParser(t, resp.Body) 22 + search := htmlDoc.doc.Find(".list-header-search > .search > .input > input") 23 + placeholder, _ := search.Attr("placeholder") 24 + assert.Equal(t, "Search pulls...", placeholder) 25 + }