Hi Vincent,
On Thu, Jun 21, 2012 at 8:22 AM, Vincent Massol <vincent(a)massol.net> wrote:
Hi Eddy,
On Jun 21, 2012, at 1:55 AM, Eduard Moraru wrote:
Hi devs,
Lately, I`ve been working on being able to filter the events that are
displayed by the Activity Stream macro.
I`ve implemented both the JavaScript and the no-JavaScript version and
I`d
like your vote on whether we want to merge it
into master or not.
Please have a look over the pull request [1][2] and let me know if you
spot
any bad decisions or bad code :)
Here's my +1
Hey, I didn't know you were working on this! :)
(maybe I missed an email from you stating that you were going to work on
this - if not, might be good to have one next time)
Yes, this work is done for the Wiki3.0 project and now comes as a
contribution back to platform.
It looks like a cool feature (that's making our AS code even more complex
to maintain though but that part would probably stay even after we rewrite
the AS code in Java).
I am not convinced that we should convert it to Java, but that's another
discussion :)
Some questions below so that I can understand this a
bit more :)
So, if I understand properly this allows to filter what's displayed by the
Activity Stream independently of the parameters used in the activity macro.
Currently the macro has the following params: wikis, spaces, authors, tags,
minor/major, number of entries and number of subentries (see
http://extensions.xwiki.org/xwiki/bin/view/Extension/Activity+Macro).
So does it mean that the parameters you use on the
macro are considered to
be just defaults that the user can then modify live?
Yes, the macro parameters are the default filters with which the activity
is initially displayed, but then the user can add/remove filters as (s)he
wishes.
Those filters are not saved, are they? (meaning if you refresh the page or
go to another page and come back, they're lost)
If you click on another link and then press 'Back' in the browser, the
filters are preserved.
If you refresh the page, the filters are cleared.
Due to how the no-JavaScript implementation handles it (reloads the page on
each new filter and updates the URL), you could (though there is no UI
element to do that) create permalinks to filtered ASs.
"Main/Activity?authors=XWiki.Admin&wikis=someWiki" takes you to a filtered
activity stream. If you add "&showFilters=true" you also see the filters
pane expanded with the active filters displayed. The JavaScript version
currently does not alter the URL.
Having the above, I am sure the javascript could update the URL as well on
every filter change, similar to what we do in the livetable.
Anyway, I did not consider this aspect too much and, as a first iteration,
I believe it is decent enough.
Do you support filtering on all the params supported by the AS: wikis,
spaces, authors, tags, minor/major, number of entries and number of
subentries ?
I did not add filters for minor/major, number of entries and number of
subentries. I consider the last 2 part of the (currently not implemented)
pagination of the "more" button. However, this is trivial to change.
This is the new list of supported macro parameters:
https://github.com/xwiki/xwiki-enterprise/blob/ff8676dbbab188001d50bf1eb81d…
This is the list of macro parameters that are filterable from the UI:
https://github.com/xwiki/xwiki-enterprise/blob/ff8676dbbab188001d50bf1eb81d…
On
http://jira.xwiki.org/browse/XWIKI-6698 it's
mentioned that you can
filter to show ALL activity. Do you handle pagination? If not there's an
obvious problem of performance.
I don`t understand this part.
First, please note that the actual text and initial proposal of XWiki-6698
was considered, but did not really make it in the proposed implementation.
What do you mean by pagination? AS does not currently support pagination in
the sense of the "more" button. However, the initially displayed activity
is limited by the default (or specified through the 'entries' parameter)
number of entries. From what I understand, there is no change there so
there should be no negative performance impact.
Is there a way to pass the filters in the request so
that we can create
links to filtered AS?
Yes, please see above where I`ve mentioned exactly this.
Thanks,
Eduard
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs