Wiki sidebar enhancements
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=590402)
</details>
<!--IssueSummary end-->
This issue proposes improvements to the wiki sidebar to create a clearer information hierarchy and give users control over how pages are ordered.
## **Problem**
| Current wiki sidebar |
|----------------------|
| {width="276" height="600"} |
The current wiki sidebar allows multiple first-level pages, which can create a flat, sprawling navigation that lacks clear structure. Additionally, pages are only sorted alphabetically within each level, with no option to sort by recent activity.
## **Proposed enhancements**
<table>
<tr>
<th>Single first-level item per wiki</th>
</tr>
<tr>
<td>
{width="900" height="469"}
---
{width=900 height=288}
</td>
</tr>
</table>
Enforce a single root page (the home page) with all other content nested beneath it. This creates a clear entry point and encourages intentional information architecture.
| Surface "Create new page" button |
|----------------------------------|
| {width="277" height="245"} |
Add a visible button in the sidebar header instead of burying it in the dropdown menu
<table>
<tr>
<th>Dropdown menu</th>
<th></th>
</tr>
<tr>
<td>
{width="398" height="289"}
</td>
<td>
* New page
* New page from template
* New folder
* Collapse all
* Expand all
</td>
</tr>
</table>
### New folder creation
Users can create empty folders from the dropdown menu to establish structure before adding content. Combined with drag-and-drop, this allows users to:
1. Create a folder
2. Drag existing pages into that folder
3. Build out the information architecture organically
### Drag and drop page organization
Users can reorganize wiki structure directly in the sidebar by dragging pages and folders:
* Drag a page into a folder to nest it
* Drag a page out of a folder to move it up a level
* Drag to reorder pages within the same level
* Visual indicators show valid drop targets during drag
This enables intuitive organization without requiring users to manually edit page paths.
---
| **Sort options: Manual vs Last edited** |
|-----------------------------------------|
| {width="561" height="346"} |
Add sorting controls to the sidebar header with two options:
* **Manual** (default): Pages appear in the order users have intentionally organized them. This preserves the information architecture and mental model users have built.
* **Last edited**: Pages reorder based on recent activity. This is useful for finding recently updated content but will break the intentional hierarchy. Users should understand this tradeoff - sorting by last edited surfaces recent work at the cost of disrupting the organized structure.
When sorting by **Last edited** user will see
* Today
* Yesterday
* Previous 7 days
* Previous 30 days
## **Design vision**
The sidebar becomes the primary interface for organizing wiki content. Users should be able to restructure their wiki as easily as organizing files in a folder, without needing to understand the underlying path system.
## **Design reference**
* [❖ View working file in Figma →](https://www.figma.com/design/FJDXeV6NVQGMgcJWCwwPpx/Wiki-Vision?node-id=451-104763&t=0Qa3upAM6URc8Enr-1)
* Parent exploration issue: https://gitlab.com/gitlab-org/gitlab/-/work_items/585099
issue