Skip to content

Truncate longer MR descriptions

Thomas Randolph requested to merge tor/feature/truncate-mr-description into master

What does this MR do and why?

When the MR description loads, this change introduces a truncation to a maximum of around 40% of the viewport height.

This change is behind the feature flag :merge_request_collapsed_description.

For #430730 (closed)

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
Too long
No need to truncate
Video of truncation - Screencast_from_2024-06-17_13-28-46
Video of loading an MR that does not need truncation Screencast_from_2024-06-17_13-32-22 Screencast_from_2024-06-17_13-30-30

How to set up and validate locally

  1. Enable the feature flag: rails c; Feature.enable( :merge_request_collapsed_description );
  2. Have an MR with a long description. I find that 10 paragraphs of Lorem Ipsum is more than enough.
    • "Long" will depend on your browser window size and viewport height
    • It will also be useful to have an MR with a short description, to test that short descriptions are not truncated
  3. Visit the MR
Edited by Thomas Randolph

Merge request reports