mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-20 17:55:55 +00:00
fix(ui): improve signature box responsiveness (#8984)
This PR improves the row/box with signature information used on commit and tag pages: [commit example](096a03eb42
), [tag example](https://codeberg.org/forgejo/forgejo/releases/tag/v1.4.0-rc2). It improves padding consistency, mainly on mobile, and cleans up code a bit. Instead of relying on min-height the box now uses paddings so overflown text is never too close to borders.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8984
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
parent
f8c1617e25
commit
62f2515138
6 changed files with 13 additions and 18 deletions
|
@ -208,7 +208,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{{if .Commit.Signature}}
|
||||
<div class="ui bottom attached message tw-text-left tw-flex tw-items-center tw-justify-between commit-header-row tw-flex-wrap tw-mb-0 {{$class}}">
|
||||
<div class="ui bottom attached message signature-row tw-mb-0 {{$class}}">
|
||||
<div class="tw-flex tw-items-center">
|
||||
{{if .Verification.Verified}}
|
||||
{{if ne .Verification.SigningUser.ID 0}}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{{$class = (print $class " isWarning")}}
|
||||
{{end}}
|
||||
|
||||
<div class="ui bottom attached message tw-text-left tw-flex tw-mb-4 tw-content-center tw-justify-between tag-signature-row tw-flex-wrap {{$class}}">
|
||||
<div class="ui bottom attached message signature-row tw-mb-4 tw-rounded {{$class}}">
|
||||
<div class="tw-flex tw-content-center">
|
||||
{{if $v.Verified}}
|
||||
{{if ne $v.SigningUser.ID 0}}
|
||||
|
|
|
@ -137,7 +137,7 @@ func TestPullCommitSignature(t *testing.T) {
|
|||
resp := testCtx.Session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
htmlDoc.AssertElement(t, "#diff-commit-header .commit-header-row.message.isSigned.isVerified", true)
|
||||
htmlDoc.AssertElement(t, "#diff-commit-header .signature-row.message.isSigned.isVerified", true)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
@ -68,8 +68,8 @@ func TestRepoSSHSignedTags(t *testing.T) {
|
|||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
doc := NewHTMLParser(t, resp.Body)
|
||||
|
||||
doc.AssertElement(t, ".tag-signature-row .gitea-unlock", !isSigned)
|
||||
doc.AssertElement(t, ".tag-signature-row .gitea-lock", isSigned)
|
||||
doc.AssertElement(t, ".signature-row .gitea-unlock", !isSigned)
|
||||
doc.AssertElement(t, ".signature-row .gitea-lock", isSigned)
|
||||
}
|
||||
|
||||
t.Run("unverified", func(t *testing.T) {
|
||||
|
|
|
@ -775,7 +775,7 @@ func TestViewCommitSignature(t *testing.T) {
|
|||
resp = testCtx.Session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
htmlDoc.AssertElement(t, ".commit-header-row.message.isSigned.isVerified", true)
|
||||
htmlDoc.AssertElement(t, ".signature-row.message.isSigned.isVerified", true)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1972,21 +1972,16 @@ details.repo-search-result summary::marker {
|
|||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.commit-header-row,
|
||||
.tag-signature-row {
|
||||
.commit-header-row {
|
||||
min-height: 50px !important;
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.ui.attached.message.tag-signature-row {
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
.tag-signature-row div {
|
||||
margin-top: auto !important;
|
||||
margin-bottom: auto !important;
|
||||
display: inline-block !important;
|
||||
.signature-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0.75rem 1rem !important;
|
||||
gap: 0.5rem 1rem;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.commit-header-buttons {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue