Hi everyone,
In order to implement Loading... (manual ordering of the page tree) I introduced the concept of pinned child pages. You can find details here https://design.xwiki.org/xwiki/bin/view/Proposal/PinnedChildPages but in “short”:
-
Pinned child pages are displayed first under their parent (in manual order), followed by the rest of the child pages (in alphabetical order).
-
There’s a new “Look & Feel >> Pinned Pages” administration section, both at wiki and at space level, to manage the list of (direct) child pages that are pinned.
-
Top level pinned pages are saved in
XWikiPreferences
(using an object ofXWiki.PinnedChildPagesClass
). -
Pinned child pages for a given parent page are saved in
WebPreferences
of that page -
The saved list of pinned child pages is of course updated when the referenced pages are renamed, moved or deleted.
-
There’s a new suggest picker to select direct child pages. Suggestions are fetched from:
-
WikiChildrenResource
(e.g.rest/wikis/xwiki/children?offset=0&limit=10&search=foo
) a new REST resource -
PageChildrenResource
(e.g.rest/wikis/xwiki/spaces/Sandbox/pages/WebHome/children?hierarchy=nestedpages&start=0&number=10&search=foo
) an existing REST resource that was modified to support the nested page hierarchy besides the old parent-child hierarchy. - Selected (pinned) pages can be reordered with drag & drop in the suggest picker
-
-
There’s a new
PageHierarchy
component (inxwiki-platform-index-tree-api
), used by the previously mentioned REST resources, to get the list of child pages for a given parent entity reference (wiki or document reference). -
The Navigation Panel administration section was modified to allow changing the order of the top level pages and save this as pinned pages.
- Moving a top level page pins it (in its new position) and all its previous sibling top level pages (relative to the new position).
- There’s a button to explicitly pin / unpin top level pages.
- The pinned top level pages are marked with a specific icon.
- You can also use the keyboard to move top level pages as well as to pin / unpin them.
- There’s an information box below the tree advertising the new feature.
This has already been pushed in 16.4.0RC1 but if you have doubts or disagree with any of the changes I made please let me know, and I’ll try to make the needed adjustments or even revert the parts that are not good if needed.
Sorry for not bringing this up earlier.
Marius
5 posts - 3 participants