Skip to content

Prevent "GitLab Team Member" badge on comments from wrapping on mobile

Summary

The "GitLab Team Member" badge should be next to the username in comments. On mobile it sometimes wraps to a new line even when there is enough space.

Steps to reproduce

  1. Enable :gitlab_employee_badge feature flag.
    • bin/rails console
    • Feature.enable(:gitlab_employee_badge)
  2. In lib/gitlab.rb change self.com? to return true
  3. Create a user with a @gitlab.com email address
  4. Navigate to an Issue, MR, or Epic and leave a comment
  5. Resize the window to mobile

What is the current bug behavior?

"GitLab Team Member" badge wraps to a new line when there is available space.

What is the expected correct behavior?

"GitLab Team Member" badge should be next to username when there is available space.

Relevant logs and/or screenshots

ios_mr_comment

Possible fixes

Float the action buttons to give the name block more space. Add white-space: nowrap to username and badge

Edited by Peter Hegman