Gerrit 3.0.1 Diff Preferences Missing Word Wrap Option

188 views
Skip to first unread message

tony f

unread,
Sep 5, 2019, 11:07:56 AM9/5/19
to Repo and Gerrit Discussion
We were just upgraded to Gerrit 3.0.1 and there is no longer an option to turn word wrapping on or off in the Diff Preferences. I prefer to not have word wrapping on, so that I can see the code as it exists in the actual code file. It makes it easier to look for poorly formatted code. There is still a wrap option for the Edit Preferences, but it is also needed for the Diff Preferences.

Ben Rohlfs

unread,
Sep 5, 2019, 11:43:28 AM9/5/19
to tony f, Repo and Gerrit Discussion
Can you check whether the "fit to screen" preference is what you are looking for?

On Thu, Sep 5, 2019 at 5:07 PM tony f <farrou...@gmail.com> wrote:
We were just upgraded to Gerrit 3.0.1 and there is no longer an option to turn word wrapping on or off in the Diff Preferences. I prefer to not have word wrapping on, so that I can see the code as it exists in the actual code file. It makes it easier to look for poorly formatted code. There is still a wrap option for the Edit Preferences, but it is also needed for the Diff Preferences.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/127f2657-b89a-4109-9cb6-16ed0baa08db%40googlegroups.com.

tony f

unread,
Sep 5, 2019, 12:04:04 PM9/5/19
to Repo and Gerrit Discussion
I have that checked and also changed the Diff Width setting to 300, but the lines are still wrapping. I did try stretching my browser window across 2 screens so that the old is on one screen and the new on the second, but even then, some lines are too long and automatically wrap. Yes, it is a bad idea for developers to create such long lines of code, but I can't control that unfortunately. It would just be nice to have the Word Wrap option again that we can turn on or off so that when it is off, the lines do not wrap and we get horizontal scroll bars, just as we had in the older version of Diff.


On Thursday, September 5, 2019 at 11:43:28 AM UTC-4, Ben Rohlfs wrote:
Can you check whether the "fit to screen" preference is what you are looking for?

On Thu, Sep 5, 2019 at 5:07 PM tony f <farrou...@gmail.com> wrote:
We were just upgraded to Gerrit 3.0.1 and there is no longer an option to turn word wrapping on or off in the Diff Preferences. I prefer to not have word wrapping on, so that I can see the code as it exists in the actual code file. It makes it easier to look for poorly formatted code. There is still a wrap option for the Edit Preferences, but it is also needed for the Diff Preferences.

--
--
To unsubscribe, email repo-d...@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.

Martin Fick

unread,
Sep 5, 2019, 1:40:46 PM9/5/19
to repo-d...@googlegroups.com, tony f
On Thursday, September 5, 2019 9:04:04 AM MDT tony f wrote:
> I have that checked and also changed the Diff Width setting to 300, but the
> lines are still wrapping. I did try stretching my browser window across 2
> screens so that the old is on one screen and the new on the second, but
> even then, some lines are too long and automatically wrap. Yes, it is a bad
> idea for developers to create such long lines of code, but I can't control
> that unfortunately. It would just be nice to have the Word Wrap option
> again that we can turn on or off so that when it is off, the lines do not
> wrap and we get horizontal scroll bars, just as we had in the older version
> of Diff.

In the original diff screen, there was a single scrollbar and it was useful to
be able to view the content of new files such as here:

https://gerrit-review.googlesource.com/c/gerrit/+/45524/12/gerrit-gwtui/src/
main/java/com/google/gerrit/client/changes/ChangeFileApi.java

By scrolling the left side of the screen, which was empty since it's a new
file, all the way out of view so that the new content on the right side could
take up the entire view port without wasting half the viewport with a blank
page.

I hope that we might consider no longer disabling the built-in browser
horizontal scrollbar which allows users to use the browser to its fullest
potential, and to thus re-enable this very useful viewing mode again in the
diff screen,

-Martin

--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation

tony f

unread,
Sep 6, 2019, 7:09:59 AM9/6/19
to Repo and Gerrit Discussion
I just found out that there is a ticket for this that was accepted (https://bugs.chromium.org/p/gerrit/issues/detail?id=9588), so hopefully, the feature will be back soon.
Reply all
Reply to author
Forward
0 new messages