Skip to content

WIP: Deeply nested wiki pages

Alex Kalderimis requested to merge deeply-nested-wiki-pages into master

What does this MR do?

This is an extension to !30245 (closed) adding the following features:

  • extend directory nesting to more than one level. The current behaviour is deeply unintuitive to anyone used to hierarchical file systems. This allows true multi-level nesting.
  • directories containing a single item are elided, eliminating the need to click through a long chain of pages to get to a single file.

This fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/30441

Screenshots:

Wiki pages listing, showing clickable intermediate directories:

wiki-pages-showing-intermediate-dirs

Directory listing of intermediate directory, showing correct breadcrumbs and page listing:

directory-showing-deep-nesting

Sidebar, showing full hierarchy:

sidebar-showing-deep-nesting

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

The algorithm for nesting the directories is recursive and its recursion depth is equal to the deepest directory path. This could have the effect of blowing the stack. We may want to mitigate this by setting a maximum directory depth limit.

Related issue

This issue isn't necessarily the Pages view, but is related regarding the style of the pages structure in the sidebar.

https://gitlab.com/gitlab-org/gitlab-ce/issues/30441

/cc @jareko

Edited by Alex Kalderimis

Merge request reports