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 stream #557

Closed
mario opened this issue Jan 19, 2017 · 44 comments
Closed

Activity stream #557

mario opened this issue Jan 19, 2017 · 44 comments

Comments

@mario
Copy link
Contributor

mario commented Jan 19, 2017

Basic activity stream implementation should be done without actually linking to files and such in the first iteration - but will include previews.

According to @nickvergessen API for this should be available in v12.

I'd appreciate all input from the @nextcloud/designers team on how the actual screen and items should look like.

@tobiasKaminsky and @AndyScherzinger - you're more than welcome to chime in as well.

@jancborchardt
Copy link
Member

Here’s the mockup of the activity stream merged with notifications as @mario and I talked about:
img_20170124_113357

From the writeup in the sidebar issue: #556 (comment)

Activity: Merged Activity & notifications etc, much like the unified timeline in the sidebar of files nextcloud/server#658. Most of these entries will at some point be interactive, like accepting a share, reverting to a version, or commenting etc. Actionable items like failed uploads or shares to be accepted will be shown up top. They will be separated by intermittent headers:

  • Failed uploads is first cause it’s local and most important cause it can lead to data loss. Will have a »Retry« and »Clear« in the header with text+icons. Then icons for each individual item.
  • Requires attention (working title) are the notifications and activities with interactivity which come from the server. For example incoming shares you need to accept. (Or in the future comments where you were mentioned with an action to reply.)
  • Activities / History where all the activites go in the end, and where also the things you act upon from Failed uploads and Requires attention go to → which is a big reason why this is a single view instead of separate ones. It’s the same things.

This was referenced Jan 24, 2017
@MorrisJobke
Copy link
Member

Keep in mind that there should be an option to filter the activities by "recently added", "recently modified" and "shared files".

@mario
Copy link
Contributor Author

mario commented Feb 5, 2017

@MorrisJobke you mean Files themselves, not activities?

@MorrisJobke
Copy link
Member

@MorrisJobke you mean Files themselves, not activities?

Didn't we want to put this into the activities, because there is no other API where we can get the "recently added"/... stuff from?

@mario
Copy link
Contributor Author

mario commented Feb 5, 2017

I can get shared files I believe in a flat list, right @icewind1991? As for the rest, I can read modification/creation date? (I believe so, please correct me if I'm wrong)

@MorrisJobke
Copy link
Member

But not across all files. The modified date can only be read for the listed files.

@mario
Copy link
Contributor Author

mario commented Feb 6, 2017

@icewind1991 should be able to get me a flat list of recently modified (say modified in the last three days) via new webdav search, right? :)

@MorrisJobke
Copy link
Member

@icewind1991 should be able to get me a flat list of recently modified (say modified in the last three days) via new webdav search, right? :)

Oh - didn't know that one :)

@mario
Copy link
Contributor Author

mario commented Feb 7, 2017

No, I was telling him to implement it :P

@icewind1991
Copy link
Member

The api should support that yes

@mario
Copy link
Contributor Author

mario commented Feb 7, 2017

@MorrisJobke so? We're putting it in the sidebar as a Files "filter"/view, right? Rather than activity filter?

@MorrisJobke
Copy link
Member

@MorrisJobke so? We're putting it in the sidebar as a Files "filter"/view, right? Rather than activity filter?

Yes.

@jancborchardt
Copy link
Member

We can have the views »Activity« and »Recent«. The latter could basically be a shortcut to the file list but sorted by most recently modified (which includes recently added).

Uploads and modifications are part of activity too of course.

@AndyScherzinger
Copy link
Member

@nickvergessen I talked to @jancborchardt about how activities should be displayed and the idea is to have it basically look like on the web:
activities

How can I distinguish all the different "activities"? Since they

  • need to get different icons (which should likely be shipped with the app, to the server response to make them crispy)
  • How can I detect what part of the string needs to be made bold?
  • how do I know where to put an avatar and which one that is since that also requires calling the server to get the image, while for a first iteration we could drop avatar support
  • how do I get the timestamps? relative or real timestamps (better for l18n)

@Bullnados
Copy link

Mmh. Is it possible to create one 'removed' and one 'shared' folder and collect all shares in that?

@nickvergessen
Copy link
Member

On API v1 that is not possible. On API v2 all the necessary information is available.
I did not manage to make it OCS yet. The current docs for v2 are in https://github.com/nextcloud/activity/blob/master/docs/endpoint-v2.md

I had to finish all the other tasks for 12 first. It's still on my todo.
I will have a look what is still open and needs tweaking and create a PoC PR for making it OCS.

@nickvergessen
Copy link
Member

PR is in nextcloud/activity#125

@AndyScherzinger
Copy link
Member

@nickvergessen is there a documentation of the data structure/json so I can support @mario with the UI part but already having the UI part and the UIs data structures in place (at least in some 90% way)?

@nickvergessen
Copy link
Member

Sure, see the post above. Only the URL is not correct. That is fixed in the PR:
https://github.com/nextcloud/activity/blob/8397c3a8f24512b1b5afe8996f1343a572f5d65b/docs/endpoint-v2.md

@jancborchardt
Copy link
Member

@AndyScherzinger and a big missing important part is the actual file and the file preview :)

@AndyScherzinger
Copy link
Member

@jancborchardt where would I see that? The Mockup is a screenshot from the web ui ?! (v.11.0.2 though)

@jancborchardt
Copy link
Member

@AndyScherzinger here’s some proper screenshots from how it looks like since some versions :)
capture du 2017-03-26 23-25-51 capture du 2017-03-26 23-25-32

@AndyScherzinger
Copy link
Member

@jancborchardt oh, I simply looked at the right frame when you click on a file...

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Mar 26, 2017

@jancborchardt and also I'd guess the first iteration will likely be simpler. What do you think @mario @aleister09 ?

@mario
Copy link
Contributor Author

mario commented Mar 27, 2017

@AndyScherzinger indeed, all the rich stuff won't be in the first implementation.

@jancborchardt
Copy link
Member

@AndyScherzinger aaah, makes sense. :D Yeah no, the activity list should look like the Activity app, because it’s about all files of course. :)

What’s to be kept simpler there? It’s already pretty boiled down to the essentials. And we have info like file names, filetype icons, action type, person who changed it (+avatar) and date, right?

cc @nickvergessen

@AndyScherzinger
Copy link
Member

@jancborchardt the API (at least for notifications) has 2 versions, where v2 brings in Rich subject and message where you get a string with placeholders and a key/value list for it and v1 brings subject and message where all placeholders are already substituted. So to make it look the way it does for web we need to processed the rich message/subject which means we need to parse the text, replace the placeholders, add so called spans which it a bit trickier than on web, fetch&cache avatars/thumbnails/previews. This can be done for sure but it is also very time consuming, so imho depends on the timeline.

Thus a first iteration could use the non-rich strings (basically plain text then! No images, avatars, previews etc.) and a second iteration would use the rich strings (then with the content also seen on the web UI). To some extend we might even have to support both anyways or only offer this feature for servers with v2 of the API present!

@aleister09
Copy link
Contributor

So in the first iteration the app will show just the plain text (subject) and the icon type sorted by date?
And I have some questions
-Should I use ListView or RecyclerView?
-What happen when a item is clicked?

@mario
Copy link
Contributor Author

mario commented Mar 27, 2017 via email

@aleister09
Copy link
Contributor

@mario also do i need to implement the remote operation for activities in android-library?

@mario
Copy link
Contributor Author

mario commented Mar 27, 2017

@aleister09 yes. Let me know if you need a hand.

@mario
Copy link
Contributor Author

mario commented Mar 27, 2017

@aleister09 the current code already contains a method to convert datetime to human friendly format you need (I'd need to look it up), and you should be able to find the place to extend the DB to store activities relatively easily. Let me know if not, and I'll help you out.

@AndyScherzinger
Copy link
Member

DisplayUtils.unixTimeToHumanReadable(long milliseconds)

@mario
Copy link
Contributor Author

mario commented Mar 27, 2017

There, @AndyScherzinger has it. And @jancborchardt posted how it should look (kind-of).

@AndyScherzinger
Copy link
Member

Well, in the first iteration not using the rich objects we won't be able to do the bold/avatar things since we don't know what part of the string would need to be styled...

@mario
Copy link
Contributor Author

mario commented Mar 27, 2017

@AndyScherzinger of course, we already agreed on that :)

@aleister09
Copy link
Contributor

@mario just to be sure, First I need to implement the remote operation on android-library then extend the DB to store activities and call the remote operation to show the result, Right?

@jancborchardt
Copy link
Member

@aleister09 welcome to the Nextcloud community! :) Awesome to have you and looking forward to your contributions.

@mario
Copy link
Contributor Author

mario commented Mar 28, 2017 via email

@aleister09
Copy link
Contributor

@mario I finished the first view of activities, I used the activity_item.xml like @AndyScherzinger suggested to me

For this first iteration Should I add the header with the date? and Do you have the icons to match them with the activity's type?

device-2017-03-28-174527

I will work with the DB Store

@mario
Copy link
Contributor Author

mario commented Mar 29, 2017

@aleister09 no need. For the icon - it should be in the payload under 'icon'. Is it not there?

@nickvergessen can you please confirm he should be getting the icon back? :)

@aleister09
Copy link
Contributor

Yup, It's there, sorry I didn't see it =)
I'm going to implement it

@mario
Copy link
Contributor Author

mario commented Mar 29, 2017

@aleister09 cool. The library to use for showing SVGs is androidsvg I guess:

compile 'com.caverock:androidsvg:1.2.1'

@AndyScherzinger
Copy link
Member

#784 the initial implementation with simple text has been merged to master

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

No branches or pull requests

8 participants