Skip to content

Fix spacing around secondary badge sets

Sarah German requested to merge 1730-solutions-badge-nudge into main

What does this MR do and why?

There are two ways badges get added to page headers:

  1. Authors include them in markdown
  2. Badges get automatically added by frontend code, based on the URL path, for two special sections (Contribute and Solutions)

We do not currently have styling to cover the case where badges of both flavors are added, like we can see here: https://docs.gitlab.com/ee/solutions/cloud/aws/gitlab_instance_on_aws.html. The badges are unevenly spaced.

This MR adds styling for cases where a second badge set exists. Regardless of how a badge is added, or which combination of styles we're showing, all badges should be evenly spaced.

Closes #1730 (closed)

Screenshots, screen recordings, or links to review app

Before After
image image

Example: https://1730-solutions-badge-nudge.docs.gitlab-review.app/ee/solutions/cloud/aws/gitlab_single_box_on_aws.html

No changes expected for these scenarios:

Before After
Single frontend badge https://docs.gitlab.com/ee/solutions/ https://1730-solutions-badge-nudge.docs.gitlab-review.app/ee/solutions/
https://docs.gitlab.com/ee/development/ https://1730-solutions-badge-nudge.docs.gitlab-review.app/ee/development/
Set of markdown badges https://docs.gitlab.com/ee/user/ai_features.html#gitlab-duo-chat https://1730-solutions-badge-nudge.docs.gitlab-review.app/ee/user/ai_features.html#gitlab-duo-chat

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. Verify the badges are evenly spaced here: http://localhost:3000/ee/solutions/cloud/aws/gitlab_single_box_on_aws.html

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.

Edited by Sarah German

Merge request reports

Loading