diff options
author | kolaente <k@knt.li> | 2022-10-28 15:49:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 09:49:42 -0400 |
commit | cd5c067abe6b3d33a35ec6904abc91a0b18edfd9 (patch) | |
tree | acbf21aab27b145bfc715088da0bf82046c21bcd /templates/repo/pulls | |
parent | 5f0cbb3e800857e1d1913fc051f42d18707bd32c (diff) | |
download | gitea-cd5c067abe6b3d33a35ec6904abc91a0b18edfd9.tar.gz gitea-cd5c067abe6b3d33a35ec6904abc91a0b18edfd9.zip |
fix: PR status layout on mobile (#21547)
This PR fixes the layout of PR status layouts on mobile. For longer
status context names or on very small screens the text would overflow
and push the "Details" and "Required" badges out of the container.
Before:
![Screen Shot 2022-10-22 at 12 27
46](https://user-images.githubusercontent.com/13721712/197335454-e4decf09-4778-43e8-be88-9188fabbec23.png)
After:
![Screen Shot 2022-10-22 at 12 53
24](https://user-images.githubusercontent.com/13721712/197335449-2c731a6c-7fd6-4b97-be0e-704a99fd3d32.png)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates/repo/pulls')
-rw-r--r-- | templates/repo/pulls/status.tmpl | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/templates/repo/pulls/status.tmpl b/templates/repo/pulls/status.tmpl index b68802cd56..ca090ee843 100644 --- a/templates/repo/pulls/status.tmpl +++ b/templates/repo/pulls/status.tmpl @@ -18,14 +18,16 @@ {{end}} {{range $.LatestCommitStatuses}} - <div class="ui attached segment"> - <span>{{template "repo/commit_status" .}}</span> - <span class="ui">{{.Context}} <span class="text grey">{{.Description}}</span></span> - <div class="ui right"> - {{if $.is_context_required}} - {{if (call $.is_context_required .Context)}}<div class="ui label">{{$.locale.Tr "repo.pulls.status_checks_requested"}}</div>{{end}} - {{end}} - <span class="ui">{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span> + <div class="ui attached segment pr-status"> + {{template "repo/commit_status" .}} + <div class="status-context"> + <span>{{.Context}} <span class="text grey">{{.Description}}</span></span> + <div class="ui status-details"> + {{if $.is_context_required}} + {{if (call $.is_context_required .Context)}}<div class="ui label">{{$.locale.Tr "repo.pulls.status_checks_requested"}}</div>{{end}} + {{end}} + <span class="ui">{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span> + </div> </div> </div> {{end}} |