Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activity tab in files sidebar #358

Merged
merged 2 commits into from
Aug 24, 2015
Merged

Activity tab in files sidebar #358

merged 2 commits into from
Aug 24, 2015

Conversation

PVince81
Copy link
Contributor

@nickvergessen FYI

Not sure what attributes the endpoint is going to return eventually.
Everything is a dummy at the moment.

@PVince81
Copy link
Contributor Author

For owncloud/core#18164

@karlitschek
Copy link

You guys rock!! :-)

@PVince81
Copy link
Contributor Author

@nickvergessen I fixed the spinner issue.
Also I made ActivityCollection more generic to accept "objecttype" and "objectid".
Please implement the backend to make the filter work 😄

Currently it looks like this using the existing CSS from the page:
activity-nofilter

@jancborchardt
Copy link
Member

Nice! :) Of course the activities shown in there should only be the ones pertaining to that specific file. :)
In the screenshot above: Not the image addition or the folder creation – we need to keep it clean.

@@ -49,3 +49,12 @@
// Cron job for sending emails and pruning the activity list
$c->getServer()->getJobList()->add('OCA\Activity\BackgroundJob\EmailNotification');
$c->getServer()->getJobList()->add('OCA\Activity\BackgroundJob\ExpireActivities');

// Needed for the files sidebar entry
\OCP\Util::connectHook(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to FilesHooksStatic::register()

@PVince81
Copy link
Contributor Author

@jancborchardt see previous comment

Please implement the backend to make the filter work

@PVince81
Copy link
Contributor Author

  • TODO: implement backend for the filter
  • TODO: fix hook

url: function() {
var query = {
page: 1,
filter: 'all'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter: 'filter'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but only when objectid or objecttype are set ? or always ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all gives all, filter uses object id and type, see the following lines:
https://github.com/owncloud/activity/pull/363/files#diff-7842161f69cff3997d7b10126d8c368fR223

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this still needs updating?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scroll down

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we only set the filter if either objectId or objectType are set. Else we fetch all (could be used later in other views)

@nickvergessen
Copy link
Contributor

activity filter option is merged, event listener for loading js/css is merged

if you rebase we can test it all together

@PVince81
Copy link
Contributor Author

Will do

@PVince81
Copy link
Contributor Author

Rebased, fixed the hook and adapted.
It works now.

  • TODO: JS unit tests

@PVince81
Copy link
Contributor Author

Oops, I missed some files

@PVince81
Copy link
Contributor Author

Should be good now.

@PVince81 PVince81 changed the title WIP activity tab in files sidebar Activity tab in files sidebar Aug 20, 2015
@PVince81
Copy link
Contributor Author

Added error handler for the collection's fetch operation.
Message markup now rendered properly.

Added unit tests for ActivityTabView and ActivityCollection.
@PVince81
Copy link
Contributor Author

Unit tests added. But they will only run once owncloud/core#18459 is merged in core.

@PVince81
Copy link
Contributor Author

See how difficult it is to load core's JS files in the right order: https://github.com/owncloud/activity/pull/358/files#diff-6e207d934280c969b0add642e133ee90R29

Fortunately we added "core/js/core.json" that lists the core JS files for that which can be reused here.

@PVince81
Copy link
Contributor Author

This is ready for review @jancborchardt @nickvergessen

@nickvergessen
Copy link
Contributor

Works 👍

nickvergessen added a commit that referenced this pull request Aug 24, 2015
@nickvergessen nickvergessen merged commit dddba49 into master Aug 24, 2015
@nickvergessen nickvergessen deleted the files-activity-tab branch August 24, 2015 09:38
@jancborchardt
Copy link
Member

Yup, nice! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants