Make badges in the header Pajamas compliant
What does this MR do and why?
This migrates badges in layouts/header/_default.html.haml
to the shared
gl_badge
util. This affects the following badges:
- Canary badge
- Issue count
- MR total count
- Assigned MRs count
- Review requests count
- Todos count
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
-
To get the
Next
badge to show up, override the Canary condition like so:diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 246a31f86c9..d24f8365cc1 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 %span.gl-badge.gl-bg-green-500.gl-text-white.gl-rounded-pill.gl-font-weight-bold.gl-py-1 = _('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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #344388 (closed)
Edited by Paul Gascou-Vaillancourt