Skip to content

Add back-to-top button

What does this MR do and why?

To make it easier for users to move around in the docs, this MR adds a back-to-top button that appears in the lower right of the screen (on article pages) once the user starts scrolling down the page. Clicking the button scrolls the page back to the top.

Screenshots, screen recordings, or links to review app

wide fixed wide fluid narrow
Screenshot_2025-09-11_at_1.45.51_PM Screenshot_2025-09-11_at_1.47.51_PM Screenshot_2025-09-11_at_1.46.10_PM

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.
  2. Check out this branch.
  3. Observe that the button doesn't exist on initial page load
  4. Start scrolling down. The button should appear once the page title (h1) is completely out of the viewport.
  5. Click the button to scroll back to the top

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.

Closes #209 (closed)

Edited by Pearl Latteier

Merge request reports

Loading