Page MenuHomePhabricator

Gerrit names misalignment in 3.3.5
Closed, ResolvedPublic

Description

Upstream https://bugs.chromium.org/p/gerrit/issues/detail?id=14872

Noticed this morning after the upgrade (thank you for that!). The circles around names are misaligned on the left (only if no "icon" is next to the name? not sure), this isn't a big deal by any stretch of imagination but good to have filed.

2021-08-04-095442_221x67_scrot.png (67×221 px, 6 KB)

Event Timeline

hashar subscribed.

By default there should be a user avatar in front of the name which is made to stick to the border of the ship:

gerrit_chip.png (24×256 px, 4 KB)

That is done by removing the left padding:

polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_html.ts
/* If the first element is the avatar, then we cancel the left padding, so
   we can fit nicely into the gr-account-chip rounding.
   The obvious alternative of 'chip has padding' and 'avatar gets negative
   margin' does not work, because we need 'overflow:hidden' on the label. */
:host([cancel-left-padding]) {
  padding-left: 0;
}

Since our setup does not have the avatar icon, it is not displayed. The <span> holding the name is on its own and end up stick to the border of the chip since there is no left padding.

The change got introduced by https://gerrit-review.googlesource.com/c/gerrit/+/278254 (3.3.0 and later).

All makes sense to me, thank you @hashar for the quick and through investigation!

hashar triaged this task as Medium priority.Aug 5 2021, 9:27 AM
hashar updated the task description. (Show Details)
hashar moved this task from Backlog to Reported Upstream on the Upstream board.
This comment was removed by Paladox.
hashar claimed this task.

This has been fixed upstream and released in Gerrit 3.3.6 which I have deployed some minutes ago. I have confirmed it is no more happening.