Improve the MR item details on the open MRs dropdown in Blob view

Context

Please see: #448868 (closed)

Design

🎨 Figma | Design Discussion

State Screen
Default

V3_ disclosure.jpg

On hover of badge

V3_ on hover of disclosure.jpg

  • Use hover state for Actionable badge
On click of badge

V3_ on click of disclosure.jpg

  • Disclosure opens
  • Use active state for Actionable badge
  • The entire line item will link to the relevant MR
  • MR title text is truncated after 2 lines of text
  • UX recommendation is to have a fixed width for the MR title, and variable width to accommodate the width of the largest group of avatars for the MR Assignees

Additional notes

  • Max height of the component is <TBD>. Overflow will scroll. This is a small edge case, as expected number of MRs per file is 1 - 2.

Implementation

Implementation breakdown

Context Deliverable

#448868 (closed)

By the end of Milestone 17.10 we will address (context):

  • A badge to show the correct count of total number of open MRs associated with the file
  • On hover, a popover with a list of MR titles

#520125 (closed) (this)

This issue covers:

  • Expand the dropdown to feature the extra MR information, per the mockup. This is almost complete in !183927 (merged) but a few adjustments are needed:
    • Add showing review author, when there are no assignees.
    • See design feedback !183927 (comment 2389805322)
    • Match mobile to design (see #448868 (comment 2384158623))
    • Make list item clickable (should open MR)
    • !183927 (comment 2392973719)
  • Add to the UI a way to notify users of the query restriction (only MRs open in the last 30 days targeting this branch will be shown)
  • Add analytics instrumentation
  • Add documentation
  • Add feature tests

Accessibility guidelines for implementation

From #520125 (comment 2421875700):

  • GlBadge with tooltip: BTooltip has a known issue, so the element with a tooltip needs both a title and an aria-label attributes
  • GlDisclosure component: use :toggle-text="__('A list of open merge requests')" (EDIT: I've changed that a bit because Open merge requests might suggest opening a page with merge requests listing) and text-sr-only props on the dropdown to provide context for screen readers. We can omit the number of the MRs in the toggle text. When going through the disclosure, a screen reader will announce the total number in the disclosure group and then "1 out of 4", "2 out of 4" for each item in the disclosure
  • GlDisclosureItem component: we can omit an aria-label for the branch icon in each disclosure item, as it's only decorative.
Edited Apr 01, 2025 by Alyssa Trinh
Assignee Loading
Time tracking Loading