Make the MR interface more code focused

Created on 12 May 2025, 25 days ago

Problem/Motivation

Steps to reproduce

Compare the amount of code you can see on the MR interface vs the plain diff. Also, there's an awful lot of distracting visual clutter on the MR screen compared to the plain diff.

Proposed resolution

This would be an additional interface, probably triggerable by some account settings.

  1. Allow suppressing all elements except code on the MR inteface. This still wouldn't be just a plain text, far from it.
  2. Hover over a line of code inverts the line for easier readibility (also could be a preference)
  3. Clicking the hover brings up a modal to add a comment
  4. Drupal mandates 80 column width but these days everyone has a widescreen monitor so the right hand side is empty. This is where existing comments will be, initially invisible (another preference for initial invisibility).
  5. The initial state of a comment is just the first line of it next to the line where it belongs. You can unfurl it by clicking it.
  6. Somewhere on the top right corner you have a button to reveal comment threads: one button to show and unfurl the first and one button to unfurl all.
  7. Each comment thread is a draggable modal so it's easy to see multiple at the same time with as much context as you need. The modal has buttons to collapse the current and unfurl the next / previous one if you only want to unfurl one at a time.

Now you have an extremely code focused MR interface.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Component

GitLab

Created by

🇨🇦Canada Charlie ChX Negyesi 🍁Canada

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Charlie ChX Negyesi
  • 🇺🇸United States drumm NY, US

    GitLab is a product and not customizable like Drupal is. This sort of UI change/layer isn’t something we could reasonably implement and maintain. This would be feature requests for https://gitlab.com/gitlab-org/gitlab/-/issues

    Hover over a line of code inverts the line for easier readibility (also could be a preference)

    This one might be more doable standalone issue for GitLab. There are already preferences around syntax highlighting and diff colors at https://git.drupalcode.org/-/profile/preferences. And there are already some hover effects on the line numbers for merge request diffs. I briefly searched for related issues and found https://gitlab.com/gitlab-org/gitlab/-/issues/300469

    Somewhere on the top right corner you have a button to reveal comment threads: one button to show and unfurl the first and one button to unfurl all.

    I briefly looked for an existing issue for this one too, I did not find one. There is a “Hide all comments” option in one of the three-dot menus, so it might be doable for GitLab to add “Show all comments” next to that.

    As the Drupal community, there isn’t a lot more we can do to influence GitLab’s development other than opening good issues for their product. They do have good contributor onboarding, so its doable to contribute code to them, with the huge caveats that its a huge project and changes take care, and its mostly Ruby code.

Production build 0.71.5 2024