Files
gitea/templates/repo/pulls/status_items.tmpl
T
bircni aab9737651 fix(ui): prevent commit status popup overflowing its row (#38081)
Fixes #38079

## Regression path

The layout previously had `.commit-status-item .status-context { flex: 1
}`,
which let the context fill remaining space and ellipsize. That rule was
dropped in #37517 ("Refactor pull request view (5)") when the row markup
moved to nested `.flex-text-block` wrappers, so nothing constrained the
left block anymore.

After:
<img width="832" height="242" alt="image"
src="https://github.com/user-attachments/assets/a20019f8-6016-40f7-8901-2808280dc093"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-06-13 10:14:02 +00:00

39 lines
1.6 KiB
Handlebars

{{/* Template Attributes:
* CommitStatuses: all commit status elements
* StatusCheckData: optional, additional status check data, see backend pullCommitStatusCheckData struct
*/}}
{{$statusCheckData := $.StatusCheckData}}
{{$commitActionsStatuses := ctx.ActionsUtils.CommitStatusesToActionsStatuses $.CommitStatuses}}
{{range $cs := $.CommitStatuses}}
<div class="item commit-status-item">
<div class="flex-text-block tw-flex-1">
{{$actionStatus := $commitActionsStatuses.IconStatus $cs}}
{{if $actionStatus}}
{{template "repo/icons/action_status" (dict "Status" $actionStatus "Size" 18 "ClassName" "commit-status icon")}}
{{else}}
{{template "repo/icons/commit_status" $cs}}
{{end}}
<div class="gt-ellipsis">
{{$cs.Context}} <span class="tw-text-text-light-2">{{$cs.Description}}</span>
</div>
</div>
<div class="flex-text-block">
{{if and $statusCheckData $statusCheckData.IsContextRequired}}
{{if (call $statusCheckData.IsContextRequired $cs.Context)}}
<div class="ui label">{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}</div>
{{end}}
{{end}}
{{if $cs.TargetURL}}<a href="{{$cs.TargetURL}}">{{ctx.Locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}
</div>
</div>
{{end}}
{{range $missingCheck := $statusCheckData.MissingRequiredChecks}}
<div class="item commit-status-item">
<div class="flex-text-block tw-flex-1">
{{svg "octicon-dot-fill" 16 "commit-status icon tw-text-yellow"}}
<div class="gt-ellipsis">{{$missingCheck}}</div>
</div>
<div class="ui label">{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}</div>
</div>
{{end}}