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.

Capture.JPG (583×1 px, 123 KB)

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

Event Timeline

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?

@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.

@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!

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.

This seems fixed at least scroll bars show for me now.

Oh... It misses the end " bit.

I think this may be fixed in gerrit 3.9 based on testing locally. I can't reproduce on master but I remember work on the diff screen being done for that release.

IMG_5315.jpeg (620×1 px, 252 KB)

The above shows then end “. It’s just not obvious as it has a similar colour to the tabs when zoomed out but is blue zoomed in.

(This was discovered by someone else)