Skip to content

Fix formatting of review emails

Brett Walker requested to merge bw-restructure-review-email into master

What does this MR do and why?

Related to #437581 (closed)

Feature flag, scoped to project: :enhanced_review_email
Rollout issue #437582 (closed)

Changed from using a table to simply displaying the notes sequentially. The border between notes has been increased from 1px to 4px. This provides more obvious delineation between notes, as well as allowing a normal <hr> tag (available in markdown) to be rendered as usual (1px height) without it being confused with note boundary.

The border between the header, "Merge request xx was reviewed by ..." has been set at 8px. This gives better delineation between the header and the list of notes. Could also be set to the same 4px as between notes. But I think 8px works in this case since the borer is relatively a subtle color.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Screenshot_2024-01-06_at_10.14.11_AM Screenshot_2024-01-06_at_10.12.56_AM

How to set up and validate locally

In an open MR, comment several times on changed code, adding to a review. Make some of the comments have really long paragraph text, and add a code block that has very wide lines.

After you have submitted the review, visit http://localhost:3000/rails/mailers/notify/new_review_email, which should show the email. Notice how the paragraph is wrapped to the window width, and the code block itself can be scrolled back and forth.

Edited by Brett Walker

Merge request reports