fix(ui): commit hashes in the activity feed are misaligned by josways · Pull Request #39883 · go-gitea/gitea · GitHub
Skip to content

fix(ui): commit hashes in the activity feed are misaligned - #39883

Open
josways wants to merge 1 commit into
go-gitea:mainfrom
josways:fix/activity-feed-commit-hash-alignment
Open

josways wants to merge 1 commit into
go-gitea:mainfrom
josways:fix/activity-feed-commit-hash-alignment

Conversation

@josways

@josways josways commented Oct 20, 2026

Copy link
Copy Markdown

Fixes #38646

The problem

Each commit line of a push in the activity feed starts with the avatar stack of its co-authors. The width of that stack grows with the number of co-authors, so the hash of every commit started at a different horizontal offset and the column looked ragged.

The fix

Render these lines like the commit list of a pull request: the commit message takes the remaining width (tw-flex-1) and the hash is placed at the end of the line. All lines of a feed share the same width, so the hashes line up regardless of how wide the avatar stack is.

The avatar stack itself is left untouched on purpose: it is shared with other pages such as the PR commit list, so changing its width would only move the problem elsewhere.

Screenshots

Before:
before

After:
after

Testing

Ran a gitea/gitea:28.2.0 container locally and applied this template as a custom template override. Pushed three commits to a repository so that the three lines of the feed had avatar stacks of different widths: one commit without co-author, one with a single Co-authored-by trailer and one with two.

Measured the left edge of the hash chips on the rendered profile activity page:

line co-authors before after
1 2 362 px 958 px
2 1 358 px 958 px
3 0 352 px 958 px

The hashes were spread over 10 px before and are exactly aligned after the change. Also checked the layout at 768 px width.

AI usage

The template change was drafted with AI assistance. I reviewed the diff, parsed the whole template tree to make sure it still compiles, and verified the rendering manually before opening this PR.

Since the avatar stacks were introduced, each commit line starts with a stack whose width depends on the number of co-authors, so the hash of every commit in a push started at a different offset.

Render the lines like the commit list of a pull request: the commit message takes the remaining width and the hash is placed at the end of the line, so all hashes of a feed line up regardless of the avatar stack width.

Signed-off-by: Josway <jxh98@foxmail.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 20, 2026
@github-actions github-actions Bot added topic/ui Change the appearance of the Gitea UI type/bug labels Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. topic/ui Change the appearance of the Gitea UI type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The commit ID column in the commit records of the public activity page is not aligned.

2 participants