Skip to content

Comments

Fix timeline event layout overflow with long content#36595

Open
silverwind wants to merge 14 commits intogo-gitea:mainfrom
silverwind:fixfloat
Open

Fix timeline event layout overflow with long content#36595
silverwind wants to merge 14 commits intogo-gitea:mainfrom
silverwind:fixfloat

Conversation

@silverwind
Copy link
Member

@silverwind silverwind commented Feb 12, 2026

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:

Screenshot 2026-02-12 at 06 22 45

After:

image

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>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 12, 2026
@github-actions github-actions bot added modifies/templates This PR modifies the template files modifies/frontend labels Feb 12, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@silverwind silverwind changed the title Fix timeline event layout overflow with long content (#36580) Fix timeline event layout overflow with long content Feb 12, 2026
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>
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Feb 12, 2026

There are more float abuses, but this shouldn't cause any other regressions.

It does break layouts, maybe not only one

image

@wxiaoguang wxiaoguang marked this pull request as draft February 12, 2026 05:52
@wxiaoguang
Copy link
Contributor

There are more float abuses, but this shouldn't cause any other regressions.

It does break layouts, maybe not only one

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>
@silverwind
Copy link
Member Author

centering fixed in d5ec9df

@wxiaoguang

This comment was marked as resolved.

@silverwind
Copy link
Member Author

No need for ad hominem. Sorry I can't check for 100 regressions at the the same time.

silverwind and others added 2 commits February 12, 2026 07:04
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>
@wxiaoguang
Copy link
Contributor

No need for ad hominem. Sorry I can't check for 100 regressions at the the same time.

You mean it's fine to just write and commit untested code and leave the bug-fix work for other poor people?

image

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>
@silverwind
Copy link
Member Author

No, I'm grateful for any regressions noticed. I will be more careful next time. All reported regressions are fixed now.

@silverwind silverwind marked this pull request as ready for review February 12, 2026 06:43
Signed-off-by: silverwind <me@silverwind.io>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .event rows from float/inline alignment to display: flex with wrapping.
  • Update timeline templates to use tw-ml-auto for right-aligned controls within the new flex layout.
  • Add a code-comments-list modifier 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.

lunny
lunny previously approved these changes Feb 12, 2026
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 12, 2026
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know whether it is right. I will leave for the argument.

image

@silverwind
Copy link
Member Author

silverwind commented Feb 13, 2026

I don't know whether it is right. I will leave for the argument.
image

Hmm no, that's seems not right, avatar and label must be aligned. I will fix that.

@silverwind silverwind marked this pull request as draft February 13, 2026 03:52
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@silverwind
Copy link
Member Author

Hmm no, that's seems not right, avatar and label must be aligned. I will fix that.

Fixed in 3e26fbe:

image

@silverwind
Copy link
Member Author

silverwind commented Feb 13, 2026

Found another slight avatar vertical alignment regression on the review event avatar, checking

image

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>
@silverwind
Copy link
Member Author

Found another slight avatar vertical alignment regression on the review event avatar, checking
image

Fixed again in d30595e and verified everything again.

@silverwind silverwind marked this pull request as ready for review February 13, 2026 07:23
@wxiaoguang wxiaoguang dismissed lunny’s stale review February 15, 2026 10:47

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.

@GiteaBot GiteaBot added lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 15, 2026
@silverwind
Copy link
Member Author

please re-review.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/frontend modifies/templates This PR modifies the template files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Layout issue in PR history timeline with long entry

4 participants