Skip to content

Fix load order for badge functions

Sarah German requested to merge solutions-badge-render into main

What does this MR do and why?

Fixes a bug I introduced with our programmatic section badges in !4370 (merged).

These badges are intended to appear in the Contribute and Solutions sections of the site. At this time, they do not appear because our badge functions fire in the wrong order. We need to programmatically create the URL-driven badges' HTML first, then render them as labels.

This MR just changes the order of functions in badges.js, bringing the badges back to these sections.

Screenshots, screen recordings, or links to review app

Before After
image image
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
  2. Visit a Contribute page. It should have a badge: http://127.0.0.1:3000/ee/development/
  3. Visit the solutions page. It should have a badge: http://127.0.0.1:3000/ee/solutions/

Merge request acceptance checklist

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

Merge request reports