Wiki sidebar hierarchy indentation is incorrect

Summary

The way wiki subpages are currently indented causes confusion about the hierarchy of pages.

Steps to reproduce

  1. Create a wiki with top-level pages and pages in subdirectories
  2. View the wiki sidebar

Example Project

https://gitlab.com/smokris/test-wiki-hierarchy/-/wikis has the following repo structure:

$ tree
.
├── A
│   ├── 1.md
│   └── 2.md
├── A.md
├── B
│   ├── 1.md
│   └── 2.md
├── B.md
├── C.md
└── home.md

What is the current bug behavior?

GitLab's wiki sidebar shows this:

Screenshot_2023-08-29_at_13.31.35-scaled

This is confusing since top-level page "A" is indented the same amount as its subpages "1" and "2". Same with "B".

What is the expected correct behavior?

I'd expect "A", "B", "C", and "Home" to all be indented the same amount, distinct from their subpages, like in this mockup:

Screenshot_2023-08-29_at_13.35.47-scaled

Output of checks

This bug happens on GitLab.com

Implementation Guide

Likely to be a relatively straightforward CSS fix.

Edited by John Hope