Last modified: 2013-10-11 18:51:06 UTC
Currently, Gerrit doesn't break lines in review comments, although we sometimes write code or commands there. Example of such comment: * https://gerrit.wikimedia.org/r/#/c/16606/ (my patch set 6 review comment) It already correctly break lines (I've heard there were an issue under Opera) for inline comments: * https://gerrit.wikimedia.org/r/#/c/18224/1/skins/common/preview.js
Taking this bug.
Most likely any fix for this needs to involve upstream. Either A) The class needs to be marked @external so it doesn't change from one useless string to another on upgrade, or B) gerrit.css needs to be fixed upstream so this is fixed for everyone :)
If we'd want to be wild and overkill the kludge, I tested with success (ie it doesn't break any interface element anywhere - except in documentation, which wouldn't be covered by our CSS) the following snippet in Greasemoney: GM_addStyle((<><![CDATA[ p { white-space: pre-wrap; } ]]></>).toString()); But... pending upstream resolution, I see there is already one kludge in our CSS: /** * Add word wrapping for commit messages, so horizontal scrolling isn't needed. * --2012-06-09 */ .GJEA35ODLB { white-space: pre-wrap !important; } So my agenda on the matter is: (1) to add right now a .GJEA35ODOC css element, so we can fix it on our install ; (2) submit a patch doing the same upstream (because I've the feeling we aren't the only project to put code in comments there...).
Gerrit change #21895
Merged locally.
I'm reopening it, we need to reapply this change against .commentPanelMessage.
Change 84522 had a related patch set uploaded by Dereckson: Break lines in review Gerrit comments https://gerrit.wikimedia.org/r/84522
Change 84522 merged by ArielGlenn: Break lines in review Gerrit comments https://gerrit.wikimedia.org/r/84522
Verified at https://gerrit.wikimedia.org/r/#/c/84206/ and https://gerrit.wikimedia.org/r/#/c/16606/