Skip to content

fix(list): centre the sender avatar against the row - #953

Open
shukiv wants to merge 1 commit into
bulwarkmail:mainfrom
shukiv:fix/list-avatar-vertical-center
Open

fix(list): centre the sender avatar against the row#953
shukiv wants to merge 1 commit into
bulwarkmail:mainfrom
shukiv:fix/list-avatar-vertical-center

Conversation

@shukiv

@shukiv shukiv commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Problem

The sender avatar sits high in each list row rather than centred against it — level with the sender line, with the subject and preview extending below it. Most obvious at default density, where a row is three lines tall.

Cause

The row lays out with items-start:

isFocusedMailLayout ? 'flex items-center' : 'flex items-start'

That is correct for the row as a whole: the sender line, subject and preview stack, and the body should govern the row height. But the avatar is a sibling of that body and inherits the same alignment, so it pins to the top.

Change

Give the avatar self-center in both the single-message row and the thread row. The row keeps items-start, so nothing else moves.

Deliberately not switching the container to items-center: at extra-compact density the avatar is not rendered and a selection checkbox takes its place, carrying its own !isFocusedMailLayout && 'mt-2' offset that is tuned for items-start. The two are mutually exclusive, so centring only the avatar leaves that path untouched.

Testing

tsc --noEmit clean; components/email passes (129 tests). Running on a production instance.

List rows lay out with items-start, because the sender line, subject and
preview stack and the body should govern the row height. The avatar
inherited that and pinned itself to the top, level with the sender line,
leaving it visibly high against a two- or three-line row.

Give the avatar self-center in both the single-message and thread rows.
The row keeps items-start, so nothing else moves — in particular the
extra-compact checkbox, which is mutually exclusive with the avatar and
carries its own mt-2 offset, is untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant