Page MenuHomePhabricator

Since Gerrit 3.2, gitiles monospaced text is bold
Closed, ResolvedPublicBUG REPORT

Description

The monospaced text (commit messages and code) in new Gerrit gitiles pages appears bold.


This appears to be coming from a rule in base.css:

.u-pre {
  font-size: 10pt;
  font-weight: 500;
  white-space: pre;
}

Unsetting font-weight in this rule results in normal-weight text.

Link to our gitiles with Gerrit's own fonts:
https://gerrit.wikimedia.org/r/plugins/gitiles/operations/software/gerrit/+/589af813ccca4c329bd4845852cd9d6d73d1d11d/gerrit-main/src/main/java/Main.java

Link to the same file in the same commit on gerrit-review with 3rd party fonts:
https://gerrit.googlesource.com/gerrit/+/589af813ccca4c329bd4845852cd9d6d73d1d11d/gerrit-main/src/main/java/Main.java

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 28 2020, 3:12 PM

https://wm-bot.wmflabs.org/logs/%23wikimedia-tech/20200628.txt

[04:13:29] <AntiComposite>	 is everything supposed to be bold in new gerrit gitiles?
[07:22:26] <andre__>	 AntiComposite: where exactly (URL) to see "everything in bold"?
[07:38:50] <legoktm>	 andre__: I'm guessing it's on pages like https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master where the entire commit message looks bolded...
[07:39:20] <legoktm>	 I can't tell if it's actually bolded or that's just how the font looks like
[07:56:02] <Nemo_bis>	 Apparently it's because of the use of "Roboto Mono Medium". Once I disable the custom fonts, the page looks fine.
[08:41:53] <qchris>	 AntiComposite: Yes, fonts on gitiles have changed. Before (on previous gerrit) fonts got loaded from Google. That's not what we want for various reasons (E.g.: T240264). So we switched gitiles to the fonts that Gerrit itself provides.
[08:41:53] <stashbot>	 T240264: Gerrit loads font from fonts.googleapis.com and fonts.gstatic.com - https://phabricator.wikimedia.org/T240264
[08:42:04] <qchris>	 That way we can avoid the loading from 3rd party resources.
[08:42:38] <qchris>	 But on the flip-side: Gerrit does not provide all fonts that we want in all the weights that we want. So gitiles looks a bit different.
[08:43:10] <qchris>	 If it's a concern to you, please file a bug on phabricator so we can discuss with others.
[08:49:26] <Nemo_bis>	 Very nice to avoid loading fonts from third parties.
[08:50:05] <Nemo_bis>	 (I never loaded them in the first place so gitiles was presumably using system fonts for me.)
Aklapper renamed this task from New Gerrit gitiles monospaced text is bold to Since Gerrit 3.2, gitiles monospaced text is bold.Jun 29 2020, 7:18 AM
QChris updated the task description. (Show Details)Jun 29 2020, 7:47 AM

Change 609547 had a related patch set uploaded (by QChris; owner: Christian Aistleitner):
[operations/software/gerrit@deploy/wmf/stable-3.2] Bump gitiles plugin to v3.2.2-1-g00c5ca0-with-0e3b533

https://gerrit.wikimedia.org/r/609547

Change 609547 merged by QChris:
[operations/software/gerrit@deploy/wmf/stable-3.2] Bump gitiles plugin to v3.2.2-1-g00c5ca0-with-0e3b533

https://gerrit.wikimedia.org/r/609547

QChris closed this task as Resolved.Jul 5 2020, 9:57 PM
QChris claimed this task.

Fix is deployed and works.

QChris changed the subtype of this task from "Task" to "Bug Report".Jul 5 2020, 10:34 PM