On 22 Jul 2015 at 15:12:24, vincent(a)massol.net
(vincent@massol.net(mailto:vincent@massol.net)) wrote:
On 22 Jul 2015 at 14:29:46, vincent(a)massol.net
(vincent@massol.net(mailto:vincent@massol.net)) wrote:
Hi devs,
I’ve analyzed the issue of Nested Spaces on the IRC Bot application
(
http://jira.xwiki.org/browse/XWIKI-12341) and I’ve found some interesting use case.
Use case:
* An Application lets the user configure where to save pages the application generates or
the Application simply generates pages in some space other than the app space.
* We want the breadcrumb of the generated pages to point to the App’s home page
Before NS:
* We’re calling setParent(“.WebHome”)
After NS (the problem!):
* We’re loosing the link to the app’s home page since the breadcrumb is currently using
references…
So the question is: how do we solve this use case?
I don’t have many answers. I can think of only 1 ATM:
* Keep the ability to set the parent in the Edit page UI
* When displaying the breadcrumb for a page, check if the page has specified a parent and
if so, uses it instead of the reference parent.
* Possibly remove the configuration option to disable parent/child relationship and
always use the parent when set, and the reference when not set up.
WDYT? Any idea for supporting this use case or for doing it differently?
The other option is to drop this use case…
After more thinking I think the best is to drop this use case.
This means it’s up to the user (or the app developer) to decide where to save pages and to
put them in the right place so that their breadcrumb will be relevant.
For example for the IRC Bot, the user (admin) could decide to store the IRC logs in a
IRC.Archives space (instead of the default IRC space), or in some UserData.IRC space for
example and in UserData.IRC.WebHome he’d have some links to the IRC app for example.
Thanks
-Vincent
Yet another option is to make the breadcrumb behavior
configurable and have 3 implementations (for ex):
* pure reference-based
* pure parentchild-based
* mixed reference + parent child override
Thanks
-Vincent