Hi,
On Tue, Feb 15, 2011 at 16:44, Anca Luca <[email protected]> wrote:
> Hi devs,
>
> I committed XWIKI-5938 but I think we should discuss the default source
> of the dashboard macro, namely where does it pick the gadget objects to
> display on the dashboard, e.g. in the case of a dashboard macro call in
> an included document.
> It is very easy to add a "source" parameter to the dashboard macro,
> which would tell the dashboard where should it read the objects from
> (and render in the context of the current document), but now the
> question is what should {{dashboard /}} without parameters do?
>
> 1/ read the objects from the current document, which means, in the case
> of an include, it will depend on the context of the include. Note that,
> if an include is done in a new context, then all the gadgets on that
> dashboard will be also relative to the included document (e.g. if they
> use $doc, the $doc will be the included document, not the including doc).
>
> 2/ read the objects from the closest MetaData.SOURCE, which means the
> document from which the content that contains the {{dashboard /}} call
> comes from. E.g. in the case of an include, the included document.
>
My take is that the default should be to use the including document as the
default source (solution 1/). If users want another document to be the
source, they can specify it manually.
Rationale: it's the easiest to understand / less cognitive demanding
behavior (I put the dashboard macro on page A, it gets data from page A). As
an user, if I add a dashboard on a page and I can't see where it takes data
from right away even though I didn't specify a source, I will feel lost. So
it feels natural to me to have behavior 1/ and it's in the spirit of how the
include macro works by default.
Guillaume
WDYT?
>
> There are a lot of possible situations to discuss, I will just present a
> few usecases below, to be taken into account when analyzing:
>
> A. The current Main.Dashboard is included in all the WebHomes by
> default, but its gadgets refer to the current document (the _including_
> document)
>
> B. Users want to be able to easily customize their WebHomes, without
> affecting other people (not change the wiki general dashboard, but only
> their space dashboard)
>
> C. There is a dashboard somewhere on the wiki, Main.CoolDashboard, and
> users want to be able to include that dashboard as a copy, without
> having to re-create the dashboard objects on their including page
>
> D. User dashboards: at one point we will want each user to have their
> own dashboard on their profile page, which is rendered by a sheet.
> Ideally we should have the same user sheet for all users.
>
> E. Also, the user dashboard should be include-able on the Main.WebHome
> of a logged in user (a "Home").
>
> F. Since the include doesn't make too much sense for a dashboard
> document (since the dashboard document is only a call to a {{dashboard
> /}} macro), users will replace its usage with {{dashboard /}} macro
> calls, with a source parameter to pick gadget objects from another
> document ('reuse' a dashboard definition).
>
> If you can think of more cases that could involve include issues, please
> fill them in.
>
> Thanks,
> Anca
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs