Wiki sidebar sorts page slugs case-sensitive
Summary
-
The wiki sidebar does not really sort page slugs the manner one would expect. Pages are grouped together by the casing of their first letter in the page slug.
-
The
home.md
is a special exception out of all pages and is handled even more confusing. When displayed in the wiki sidebar, it will always be converted to starting with a capital letter - but that only relates to how it is displayed. From its position shown in the sidebar list, one can deduct how the casing actually is.
In general it would be nice if all page slugs start consistently with upper- or lowercase, however, when creating them, any combination of upper- and lowercase characters is possible. To avoid confusion on the file-system level, the sidebar should thus continue to expose the actual casing and also show the actual casing of home.md
Steps to reproduce
- Create a new wiki with
home.md
starting in lowercase via UI - Create a couple of page slugs starting with an uppercase letter via UI
- Then a couple of pages starting with lowercase letter via UI
- To maximize confusion, clone/checkout the repository, add a page slug called
Home.md
(note the capital letter), commit & push, check out the sidebar display (also see below screenshot and/or example project)
Example Project
https://gitlab.com/test-wiki-bug-corp/test-wiki-bug-group/wiki-bugs/wikis/
What is the current bug behavior?
The sidebar sorts page slugs grouped by their initial letter casing and displays the home page slug always with a capital letter, such as:
Aa Ba Home Xa ab bb Home xb
Screenshot from the example project:
What is the expected correct behavior?
Case-insensitive sorting over all pages and display the home page slug in its actual casing, such as:
Aa ab Ba bb home Home Xa xb
In the case of the example project, one would of course prefer to see TopicA
followed by topicB
followed by TopicC
etc.
Output of checks
This bug happens on GitLab.com