Fix display of code blocks in change descriptions (Review Board version).
Review Request #8364 — Created Aug. 30, 2016 and submitted
The way full-width code blocks were shown in change descriptions was incorrect
(things were offset oddly to the left, and there was a big extra margin added
at the bottom).The fix involves changes to both djblets and Review Board. This change contains
the Review Board side, which provides overrides for specific occurrences, such
as review request fields and change descriptions.
Verified the appearance of full-width code blocks in:
- Review request fields.
- The change description field in the review request draft header.
- The change description field in change description boxes.
- Field change diffs in change description boxes.
- Comments and headers in the review dialog.
- Comments and headers in reviews.
- Draft replies to reviews.
- Diff comment flag pop-ups.Checked that all affected text editors with full-width code blocks didn't have
any vertical jumps when opening or closing the editor.
Description | From | Last Updated |
---|---|---|
Let's swap these. |
chipx86 |
- Description:
-
The way full-width code blocks were shown in change descriptions was incorrect
~ (the CSS rules were 90 degrees rotated from what they should have been, and ~ there was a big extra margin added for what was intended to be the bottom). ~ (things were offset oddly to the left, and there was a big extra margin added ~ at the bottom). The fix involves changes to both djblets and Review Board. This change contains
~ the Review Board side. ~ ~ This is mostly just finishing up the overrides from the djblets-inherited style
~ for the code blocks shown in inline editors. While I was doing this, I noticed ~ the Review Board side, which provides overrides for the review request fields ~ and change descriptions. The change to the fields was only necessary because I ~ noticed that there were some vertical jumps when opening and closing the ~ editor, so I've smoothed those out so that everything saved put. - that there were some vertical jumps when opening and closing the editor, so - I've smoothed those out so that everything stays put. - Commit:
-
8d2cdf75b657c50455da02d7e16dff3e98078e9fb47a65ea3f8271296e7472be6e9f6c90e749fdc7
- Diff:
-
Revision 2 (+11 -5)
- Added Files:
-
Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/css/pages/review-request.less reviewboard/static/rb/css/pages/reviews.less Tool: Pyflakes Ignored Files: reviewboard/static/rb/css/pages/review-request.less reviewboard/static/rb/css/pages/reviews.less
-
So I applied these changes to my tree, and I'm seeing a few regressions.
The change description field for draft review requests isn't flush on the sides (it wasn't before either, but the left side is closer -- it needs fixing on both). It also now vertically jumps. Replies to reviews are vertically jumping as well.
Without those patches applied locally, there are no vertical jumps here.
The one thing I couldn't test are diff comments, due to diffs no longer loading on 3.0 with:
reviewablePageView.es6.js:141 Uncaught TypeError: Cannot read property 'reviewRequestData' of undefined
Looks due to the new review page stuff?
My tests are all on upstream Djblets release-0.10.x and Review Board release-3.0.x, and I tested against Chrome and Firefox.
- Description:
-
The way full-width code blocks were shown in change descriptions was incorrect
(things were offset oddly to the left, and there was a big extra margin added at the bottom). The fix involves changes to both djblets and Review Board. This change contains
~ the Review Board side, which provides overrides for the review request fields ~ and change descriptions. The change to the fields was only necessary because I ~ the Review Board side, which provides overrides for specific occurrences, such ~ as review request fields and change descriptions. - noticed that there were some vertical jumps when opening and closing the - editor, so I've smoothed those out so that everything saved put. - Testing Done:
-
~ Looked at a variety of full-width code blocks throughout the UI. Everything
~ looked correct now. ~ Verified the appearance of full-width code blocks in:
~ - Review request fields. + - The change description field in the review request draft header. + - The change description field in change description boxes. + - Field change diffs in change description boxes. + - Comments and headers in the review dialog. + - Comments and headers in reviews. + - Draft replies to reviews. + - Diff comment flag pop-ups. + + Checked that all affected text editors with full-width code blocks didn't have
+ any vertical jumps when opening or closing the editor. - Commit:
-
b47a65ea3f8271296e7472be6e9f6c90e749fdc71c0a71ab42d7c9b1e804f10c186d398e3404fde3