Skip to content

Commit 8275653

Browse files
committed
remove no-description
1 parent 3939146 commit 8275653

File tree

3 files changed

+2
-33
lines changed

3 files changed

+2
-33
lines changed

options/locale/locale_en-US.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,6 @@ action.blocked_user = Cannot perform action because you are blocked by the repos
11931193
download_archive = Download Repository
11941194
more_operations = More Operations
11951195
1196-
no_desc = No Description
11971196
quick_guide = Quick Guide
11981197
clone_this_repo = Clone this repository
11991198
cite_this_repo = Cite this repository

templates/repo/home.tmpl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@
77
{{if and (not .HideRepoInfo) (not .IsBlame)}}
88
<div class="repo-description gt-word-break">
99
{{- $description := .Repository.DescriptionHTML ctx -}}
10-
{{- if $description -}}
11-
{{- $description | RenderCodeBlock -}}
12-
{{- else if .IsRepositoryAdmin -}}
13-
<span class="no-description tw-italic">{{ctx.Locale.Tr "repo.no_desc"}}</span>
14-
{{- end -}}
15-
{{- if .Repository.Website}}<a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end -}}
10+
{{if $description}}{{$description | RenderCodeBlock}}{{end}}
11+
{{if .Repository.Website}}<a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end}}
1612
</div>
1713
<div class="tw-flex tw-items-center tw-flex-wrap tw-gap-2 tw-my-2" id="repo-topics">
1814
{{/* it should match the code in issue-home.js */}}

tests/integration/repo_test.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@ func TestViewRepo(t *testing.T) {
2828
resp := session.MakeRequest(t, req, http.StatusOK)
2929

3030
htmlDoc := NewHTMLParser(t, resp.Body)
31-
noDescription := htmlDoc.doc.Find(".repo-description").Children()
3231
repoTopics := htmlDoc.doc.Find("#repo-topics").Children()
3332
repoSummary := htmlDoc.doc.Find(".repository-summary").Children()
3433

35-
assert.True(t, noDescription.HasClass("no-description"))
3634
assert.True(t, repoTopics.HasClass("repo-topic"))
3735
assert.True(t, repoSummary.HasClass("repository-menu"))
3836

@@ -177,30 +175,6 @@ func TestViewRepoWithSymlinks(t *testing.T) {
177175
assert.Equal(t, "link_link: svg octicon-file-symlink-file", items[4])
178176
}
179177

180-
// TestViewAsRepoAdmin tests PR #2167
181-
func TestViewAsRepoAdmin(t *testing.T) {
182-
for user, expectedNoDescription := range map[string]bool{
183-
"user2": true,
184-
"user4": false,
185-
} {
186-
defer tests.PrepareTestEnv(t)()
187-
188-
session := loginUser(t, user)
189-
190-
req := NewRequest(t, "GET", "/user2/repo1.git")
191-
resp := session.MakeRequest(t, req, http.StatusOK)
192-
193-
htmlDoc := NewHTMLParser(t, resp.Body)
194-
noDescription := htmlDoc.doc.Find(".repo-description").Children()
195-
repoTopics := htmlDoc.doc.Find("#repo-topics").Children()
196-
repoSummary := htmlDoc.doc.Find(".repository-summary").Children()
197-
198-
assert.Equal(t, expectedNoDescription, noDescription.HasClass("no-description"))
199-
assert.True(t, repoTopics.HasClass("repo-topic"))
200-
assert.True(t, repoSummary.HasClass("repository-menu"))
201-
}
202-
}
203-
204178
// TestViewFileInRepo repo description, topics and summary should not be displayed when viewing a file
205179
func TestViewFileInRepo(t *testing.T) {
206180
defer tests.PrepareTestEnv(t)()

0 commit comments

Comments
 (0)