Unified / compact committer information vs author in the commit details pane in history view
Problem statement
The commit details' header area has a number of problems related to the fact that it uses 4 labels/lines to display the author and commiter information.
- It wastes precious vertical space that could be used for other information
- It causes image alignment problems (issue #409 (closed)), with and without committer information:
Proposed solution(s)
I would propose to combine everything on only two lines, by using email hyperlinks on the names (instead of standalone; the title
attribute allows revealing the email address in a GtkTooltip without even needing to click the hyperlinks) and using more natural sentences.
Overall this would save half of the vertical space and guarantee that it doesn't look weird with avatar images.
My proposed universal solution:
<a href="mailto:email_address" title="email_adress">Larsa Ferrinas Solidor</a> <small>authored on 2023-12-07-T17:38-0500</small>
…on the first line label (note: I originally phrased it as "Authored by […] on […]" instead of "[…] authored on […]" because it felt natural, but here I switched to putting the verb afterwards to kinda match the existing UI's lack of verb for authors, and that way it also guarantees that the author's name will not be ellipsized)…
…and for the 2nd line label, use this:
Committed by <a href="mailto:other_email" title="other_email">Penelo von Rabanastre</a> <small>on 2023-12-12T01:40+0100</small>
The second line label's properties could remain small-size and faded out like it is currently.
Additionally:
- When the email address starts with
noreply@
orno-reply@
(as is the case with GitHub's merge commits), it shouldn't use a hyperlink. - When the committer's email address (and committer name) is the same as the author's, don't hyperlink the committer on the 2nd line.
It would look roughly like this (simulated using the GTK Inspector)
Committer different from the author:
Committer identical to the author:
Previously self-rejected ideas: I originally thought of putting the author, committer and dates all on the same 1st line, and using the 2nd line for the commit's title (commit message's 1st line) instead, however this wouldn't really work when using gitg's "Horizontal layout" mode, as the committer's info would always get truncated out. Below is an expandable section that shows what I had in mind, and further below is the final universal solution I came up with (which is simpler to implement anyway).
Click to expand details
I originally imagined these possibilities :Authored and committed by <a href="mailto:the_email" title="the_email">Larsa Ferrinas Solidor</a> <small>on 2023-12-07T17:38-0500</small>
Commit message's first line (title) goes here, in bold characters
Authored by <a href="mailto:the_email" title="the_email">Larsa Ferrinas Solidor</a> <small>on 2023-12-07T17:38-0500</small>, committed by <a href="the_other_email" title="the_other_email">Penelo von Rabanastre</a> <small>on 2023-12-12T01:40+0100</small>
Commit message's first line (title) goes here, in bold characters
Authored by <a href="mailto:the_email" title="the_email">Larsa Ferrinas Solidor</a> <small>on 2023-12-07T17:38-0500</small>, committed by GitHub
Commit message's first line (title) goes here, in bold characters
However, when merge requests are committed by GitHub <noreply@github.com>
(or the GitLab equivalent), is kind of a special case I would like to get rid of completely. If it comes from "GitHub" or "GitLab" and the email address is noreply@
or no-reply@
, then I believe it shouldn't be shown at all: it is meaningless and the merge commit's author effectively is the committer.