Skip to content

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

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:

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 by Alyssa Trinh