mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-13 22:37:18 +00:00
ui: refactor display of review threads on pr view (#8138)
* refactored to untangle comment headers of different styles of comments from each other * fixed misalignments * improved consistency * fixed missing avatar rounding * made reactions aligned with content * fixed text in the "Outdated" label overflowing into the toggle icon Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8138 Reviewed-by: Beowulf <beowulf@beocode.eu>
This commit is contained in:
parent
995dba14ec
commit
cd08265406
9 changed files with 171 additions and 128 deletions
|
@ -194,7 +194,7 @@ func TestPullView_ResolveInvalidatedReviewComment(t *testing.T) {
|
|||
// even on template error, the page returns HTTP 200
|
||||
// count the comments to ensure success.
|
||||
doc = NewHTMLParser(t, resp.Body)
|
||||
assert.Len(t, doc.Find(`.comments > .comment`).Nodes, 1)
|
||||
assert.Len(t, doc.Find(`.comment-code-cloud > .comment`).Nodes, 1)
|
||||
})
|
||||
|
||||
t.Run("outdated and newer review (line 2)", func(t *testing.T) {
|
||||
|
@ -311,7 +311,7 @@ func TestPullView_ResolveInvalidatedReviewComment(t *testing.T) {
|
|||
// even on template error, the page returns HTTP 200
|
||||
// count the comments to ensure success.
|
||||
doc = NewHTMLParser(t, resp.Body)
|
||||
comments := doc.Find(`.comments > .comment`)
|
||||
comments := doc.Find(`.comment-code-cloud > .comment`)
|
||||
assert.Len(t, comments.Nodes, 1) // the outdated comment belongs to another review and should not be shown
|
||||
})
|
||||
|
||||
|
@ -343,7 +343,7 @@ func TestPullView_ResolveInvalidatedReviewComment(t *testing.T) {
|
|||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
doc := NewHTMLParser(t, resp.Body)
|
||||
comments := doc.Find(`.comments > .comment`)
|
||||
comments := doc.Find(`.comment-code-cloud > .comment`)
|
||||
assert.Len(t, comments.Nodes, 3) // 1 comment on line 1 + 2 comments on line 3
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue