Ungroup/flatten wiki page tree when ordering by created date
With introducing the sorting the following UX problem appears.
It's possible to group wiki pages into directories by creating pages with slashes in names (
dir/second...). On the index page, they are grouped and displayed in directories:
The screenshot is taken from the following page: https://gitlab.com/igor.drozdov/project-with-wikis/wikis/pages
Currently, the pages are sorted by
titleand then grouped by directories and displayed (pages first, then directories)
But if we're introducing the sorting by
created_at, then the displaying of directories should be handled somehow because a directory can contain the oldest and the newest page, so it's arguable which position in the list the directory should have
One of the options that I see is to avoid the tree view and display directory pages as
dir/second(at least for the case when it's sorted by
Unfortunately this proposal wasn't implemented in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25365, which introduced the new sorting control for wiki pages (by title and by created date).
I did a quick guerrilla usability test and people didn't understand the currently implemented behavior. They were not expecting to see the pages inside their “folders”, but as a flat hierarchy.
Notes - This implements a new directory structure for nested Wikis and their parent directories. Please see the designs to understand the hierarchy behind clicking through a directory and having it populate to the breadcrumbs. This also creates a URL structure so you can access a directory via URL