{{ message }}
Repository navigation
Conversation
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>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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:

After:

Testing
Ran a
gitea/gitea:28.2.0container 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 singleCo-authored-bytrailer and one with two.Measured the left edge of the hash chips on the rendered profile activity page:
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.