mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Improve PR Review Box UI (#22986)
This PR follows: * #22950 ### Before The Review Box has many problems: * It doesn't work for small screens. * It has an anonying animation which makes the UI laggy. * It uses "custom dropdown menu" which is very difficult to fine tune. * `$().toggle('visible')` is not a correct call * jQuery just accepts any invalid `duration` argument: `$().toggle('anyting')` * The button is not a button. <details>  </details> ### After These problems are fixed, and eliminate many `!important` games. <details>    </details> And most dropdown icons still looks good: <details>   </details> Co-authored-by: delvh <leon@kske.dev>
This commit is contained in:
parent
9ebf6424ee
commit
1fcf96ad01
9 changed files with 35 additions and 52 deletions
|
@ -24,10 +24,10 @@
|
|||
{{svg "octicon-diff" 16 "gt-mr-2"}}{{.locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="diff-detail-actions gt-df gt-ac">
|
||||
<div class="diff-detail-actions gt-df gt-ac gt-w-100">
|
||||
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}}
|
||||
<progress id="viewed-files-summary" class="gt-mr-2" value="{{.Diff.NumViewedFiles}}" max="{{.Diff.NumFiles}}"></progress>
|
||||
<label for="viewed-files-summary" id="viewed-files-summary-label" class="gt-mr-3" data-text-changed-template="{{.locale.Tr "repo.pulls.viewed_files_label"}}">
|
||||
<label for="viewed-files-summary" id="viewed-files-summary-label" class="gt-mr-3 gt-f1" data-text-changed-template="{{.locale.Tr "repo.pulls.viewed_files_label"}}">
|
||||
{{.locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}}
|
||||
</label>
|
||||
{{end}}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="ui top right pointing dropdown custom" id="review-box">
|
||||
<div class="ui tiny green button btn-review gt-ml-2 gt-mr-0">
|
||||
<div id="review-box">
|
||||
<button class="ui tiny green button gt-ml-2 gt-mr-0 js-btn-review">
|
||||
{{.locale.Tr "repo.diff.review"}}
|
||||
<span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
</div>
|
||||
<div class="menu review-box">
|
||||
<div class="ui clearing segment">
|
||||
</button>
|
||||
<div class="review-box-panel gt-hidden">
|
||||
<div class="ui segment">
|
||||
<form class="ui form" action="{{.Link}}/reviews/submit" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="commit_id" value="{{.AfterCommitID}}"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue