Page MenuHomePhabricator

Horizontal scrollbars are missing when needed in Gerrit
Open, Needs TriagePublic

Description

See this diff view: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/611399/4/extension.json

Screenshot is below. Because some lines of code do not fit the view (both on the before and the after side of the diff), you would expect to see horizontal scrollbars; but they are not there.

While you can use a hacky workaround by enabling the "fit to screen" feature of Gerrit, the correct solution is to have scrollbars when you need them. This maybe an Upstream issue (I have no way to tell). It is not browser-specific and I could reproduce it in Chrome, Firefox, etc.

UPDATE: the upstream issue is https://bugs.chromium.org/p/gerrit/issues/detail?id=13132

Event Timeline

Huji created this task.Jul 10 2020, 8:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 10 2020, 8:37 PM
QChris added a subscriber: QChris.Jul 11 2020, 8:23 PM

From reading the code, I think Gerrit breaks long lines on purpose to fit on to the desired width instead continuing them off screen (and therefore needing to use horizontal scrollbars).

Not sure if there is anything simple we can do on our end.

This maybe an Upstream issue

Yes, I think that's best to file with upstream at https://bugs.chromium.org/p/gerrit/issues/entry?template=PolyGerrit+Issue (The template "PolyGerrit Issue" should fit).
@Huji : Since you can better describe what you want, could you please file it?

Huji added a comment.Jul 11 2020, 10:43 PM

@QChris, the "break long lines" feature is the one that you can enable using the "fit to screen" option in the settings (cogwheel on the top-right). However, "fit to screen" is not selected by default. (and indeed, it should not be, because the output can be confusing, especially for languages like python where indentations bear an important meaning).

I can take a stab at filing the upstream.

Huji updated the task description. (Show Details)

@QChris, the "break long lines" feature is the one that you can enable using the "fit to screen" [...]

I guess I'm misunderstanding what you are saying, but Gerrit breaks long lines even without "fit to screen". So for example in your screenshot above from this task's description, line 67 is broken in two lines both on the left, and on the right. The second line only contains es". And also the long line 71 on the right hand side gets broken into 2 lines. The second line is only a " and kind of gets lost in all the tab markers.

I can take a stab at filing the upstream.

Thanks!

Huji added a comment.Jul 12 2020, 12:15 AM

No, you were right. I am the one who misunderstood your comment. I guess what I am vouching for is to have the option to see scrollbars, instead of broken lines.