Change canary badge size from md to sm

What does this MR do and why?

The canary badge currently uses the default, medium size, when it should actually be using the small size. This fixes it.

This happened while I was working on !79610 (merged). While wrapping up the MR, I removed some styles from header.scss as they didn't seem to be used anymore. I hadn't realized that those styles were setting the badge's size. We don't need to revert those style changes though, as we can simply leverage the built-in size prop.

Screenshots or screen recordings

Before After
Screen_Shot_2022-02-08_at_7.45.12_AM Screen_Shot_2022-02-08_at_7.44.11_AM

How to set up and validate locally

Apply the following patch to force the badge to appear:

diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml
index 81a3dc5e4ab..07fac0da0e9 100644
--- a/app/views/layouts/header/_default.html.haml
+++ b/app/views/layouts/header/_default.html.haml
@@ -14,7 +14,7 @@
             - if logo_text.present?
               %span.logo-text.d-none.d-lg-block.gl-ml-3
                 = logo_text
-          - if Gitlab.com_and_canary?
+          - if true
             = link_to Gitlab::Saas.canary_toggle_com_url, class: 'canary-badge bg-transparent', data: { qa_selector: 'canary_badge_link' }, target: :_blank, rel: 'noopener noreferrer' do
               = gl_badge_tag({ variant: :success, size: :sm }) do
                 = _('Next')

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading