Fix timeline event layout overflow with long content#36595
Fix timeline event layout overflow with long content#36595silverwind wants to merge 14 commits intogo-gitea:mainfrom
Conversation
Convert timeline event items from float-based layout to flexbox so that long content (merge commits, force pushes, labels, branch names, etc.) wraps properly instead of overflowing into elements below. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove float, vertical-align and margin rules that are now redundant because timeline event items use flexbox layout with gap. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Also #35888 (comment) |
Add align-items: center to the event flex container to restore vertical centering of badge icons with text after the float-to-flex conversion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
centering fixed in d5ec9df |
This comment was marked as resolved.
This comment was marked as resolved.
|
No need for ad hominem. Sorry I can't check for 100 regressions at the the same time. |
Remove rules targeting HTML structures that don't exist: octicon-comment in badges, commit-status-link in events, .text in .detail, and .segments in events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The timeline-avatar uses position: absolute with no explicit top value. With the parent event now using align-items: center, the static position of absolutely positioned children shifts to center. Adding top: 0 pins the avatar to the top of the timeline item. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The inline avatar inside event flex containers was vertically centered across all wrapped lines due to align-items: center on the parent. Use align-self: flex-start with height: 32px and inline-flex to keep the avatar aligned with the first line (username) while maintaining proper centering within the 32px line height for single-line events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No, I'm grateful for any regressions noticed. I will be more careful next time. All reported regressions are fixed now. |
Signed-off-by: silverwind <me@silverwind.io>
There was a problem hiding this comment.
Pull request overview
This PR fixes overflow/overlap issues in the PR/issue timeline when event rows contain long content, by replacing float-based alignment with a flexbox layout for timeline “event” rows (per #36580).
Changes:
- Convert
.repository.view.issue .comment-list .eventrows from float/inline alignment todisplay: flexwith wrapping. - Update timeline templates to use
tw-ml-autofor right-aligned controls within the new flex layout. - Add a
code-comments-listmodifier class to keep review code-comment lists from being affected by the new flex layout.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| web_src/css/repo.css | Switch timeline event layout to flex/wrap and adjust related spacing/positioning rules. |
| templates/repo/issue/view_content/comments_delete_time.tmpl | Replace float-based right alignment with tw-ml-auto for the delete-time action. |
| templates/repo/issue/view_content/comments.tmpl | Adjust markup to fit the new flex layout (move <del> inside line span, add code-comments-list, replace float-right with tw-ml-auto). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixed in 3e26fbe:
|
Remove `top: 0` from `.timeline-avatar` which caused regular comment avatars to be misaligned with the comment box arrow (bypassed 8px padding-top on timeline items). For the review avatar offset, switch from margin-top to explicit `top: 51px` positioning to precisely align with the comment box arrow regardless of static position/padding. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixed again in d30595e and verified everything again. |
Suggested by lunny https://discord.com/channels/322538954119184384/323701541297192961/1472491165004726345
And we might could enable the feature that dissmissing all the previous reviews once a new commit pushed after it was approved or rejected.
This PR gets new changes after approval.
|
please re-review. |







Fixes: #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:
After: