Fix timeline event layout overflow with long content (#36595)
Fixes: https://github.com/go-gitea/gitea/issues/36580 Bug is caused by abuse of float layout, convert layout to flex to fix it. There are more float abuses, but this shouldn't cause any other regressions. Before: <img width="939" height="165" alt="Screenshot 2026-02-12 at 06 22 45" src="https://github.com/user-attachments/assets/3e0aea82-d31e-4f4f-97d1-903b9f34de8d" /> After: <img width="961" height="191" alt="image" src="https://github.com/user-attachments/assets/b8fa64dc-594f-46a6-87e4-c20475e7d1e8" /> --------- Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -142,12 +142,12 @@
|
||||
<div class="timeline-item event" id="{{.HashTag}}">
|
||||
<span class="badge">{{svg "octicon-bookmark"}}</span>
|
||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||
{{if eq .RefAction 3}}<del>{{end}}
|
||||
<span class="comment-text-line">
|
||||
{{if eq .RefAction 3}}<del>{{end}}
|
||||
{{template "shared/user/authorlink" .Poster}}
|
||||
{{ctx.Locale.Tr $refTr .EventTag $createdStr (.RefCommentLink ctx) $refFrom}}
|
||||
{{if eq .RefAction 3}}</del>{{end}}
|
||||
</span>
|
||||
{{if eq .RefAction 3}}</del>{{end}}
|
||||
|
||||
<div class="detail flex-text-block">
|
||||
<span class="comment-text-line"><a href="{{.RefIssueLink ctx}}"><b>{{.RefIssueTitle ctx}}</b> {{.RefIssueIdent ctx}}</a></span>
|
||||
@@ -447,7 +447,7 @@
|
||||
{{end}}
|
||||
|
||||
{{if and .Review .Review.CodeComments}}
|
||||
<div class="timeline-item event">
|
||||
<div class="timeline-item event code-comments-list">
|
||||
{{range $filename, $lines := .Review.CodeComments}}
|
||||
{{range $line, $comms := $lines}}
|
||||
{{template "repo/issue/view_content/conversation" dict "." $ "comments" $comms}}
|
||||
@@ -545,7 +545,7 @@
|
||||
{{end}}
|
||||
</span>
|
||||
{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
|
||||
<a class="ui label comment-text-label tw-float-right" href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
|
||||
<a class="ui label comment-text-label tw-ml-auto" href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if not .IsForcePush}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{if and .comment.Time (.ctxData.Repository.IsTimetrackerEnabled ctx)}} {{/* compatibility with time comments made before v1.14 */}}
|
||||
{{if (not .comment.Time.Deleted)}}
|
||||
{{if (or .ctxData.IsAdmin (and .ctxData.IsSigned (eq .ctxData.SignedUserID .comment.PosterID)))}}
|
||||
<span class="tw-float-right">
|
||||
<span class="tw-ml-auto">
|
||||
<button class="ui icon button compact mini link-action" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.del_time"}}"
|
||||
data-url="{{.ctxData.RepoLink}}/issues/{{.ctxData.Issue.Index}}/times/{{.comment.TimeID}}/delete?id={{.comment.Time.ID}}"
|
||||
data-modal-confirm="{{ctx.Locale.Tr "repo.issues.del_time"}}"
|
||||
|
||||
Reference in New Issue
Block a user