Plots2: Display completed/replicated Activities on profile pages

Created on 29 Oct 2016  Â·  15Comments  Â·  Source: publiclab/plots2

We now have "activities" that people can do on the PublicLab.org site: https://publiclab.org/notes/liz/08-30-2016/check-out-these-activity-grids

As people view them, they're prompted to post their results, kind of like a replication: https://publiclab.org/notes/stoft/09-16-2016/stability-upgrade-mockup-for-plab-spectrometer-3-0

This is my replication of the above activity, for example: https://publiclab.org/notes/warren/09-20-2016/building-the-stoft-stability-upgrade-for-desktop-spectrometry-starter-kit-3-0

It'd be interesting to think through and design a way to display what activities you've 'completed' on your profile page -- so that last one would be listed on https://publiclab.org/profile/warren, for example.

You can tell that something's a replication or a build (that is, a replication of an upgrade, rather than an activity), because it'll have a replication:12345 power tag (or build:12345) -- where 12345 is the nid of the activity it's based on.

That is also shown at the top of the replication post, using this code: https://github.com/publiclab/plots2/blob/master/app/views/notes/show.html.erb#L5-L6

Collecting the replications a user's done wouldn't be that hard, but how do we display them? This needs some design work first, and the profile page is a bit messy and in need of a redesign already.

design help wanted metrics

Most helpful comment

Hi, sorry for slow reply!

For the last item, i think we're tackling that in https://github.com/publiclab/plots2/pull/2062 ! Good call though.

For the earlier ones, I like the idea that the various routes you name would exist, even if they show up as tabs. Because sometimes you want to send someone a link to one of them!

  • /wiki/tag/tagname/author/authorname
  • /maps/tag/tagname/author/authorname
  • /question/tag/tagname/author/authorname

We should make an issue for these routes changes! I like this a lot. :-)

The last portion of this issue, however, is narrower -- just to add to the middle column of the profile "stats" display (see https://publiclab.org/profile/cfastie), instead of N comments posted, a list of activities posted and completed:

5 activities posted

15 activities attempted

The top could link to (for @cfastie, for example) https://publiclab.org/tag/activity:*/author/cfastie

The bottom could link to https://publiclab.org/tag/replication:*/author/cfastie

And for questions, in the left column, https://publiclab.org/tag/question:*/author/cfastie

We don't yet have a link to answers for an author, but this is still a lot of progress!

All 15 comments

@jywarren I would like to work on this issue

Sounds great, thank you!

On Tue, Dec 6, 2016 at 12:24 PM, Mridul Nagpal notifications@github.com
wrote:

@jywarren https://github.com/jywarren I would like to work on this issue

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/928#issuecomment-265213465,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ8uCU3bihoUTa9ja6rDmA76EnwiNks5rFZpNgaJpZM4Kj8If
.

I did not get the issue completely could you tell me how do I proceed?

I'd like to propose a subset of this issue, where we make a way to select all nodes which:

  1. are authored or coauthored by a given user_id
  2. are tagged with tagname (for example replication:1234)

This can be used to list activities completed by a given user, so the format for calling it could be, perhaps:

Node.tagged_nodes_by_author(tagname, user_id) # nodes by user with given tag

This is a good first step!

Then we could make a wildcard-enabled modification for use on the user profile page like:

Node.tagged_nodes_by_author('replication:*', @user.id) # nodes by user with tags starting with `replication:`

This method could go in the Tag model, here:

https://github.com/publiclab/plots2/blob/master/app/models/tag.rb

Made the above into #1777 -- just the basic version, no wildcards yet!

@jywarren I want to work on the remaining part if it is available??

That'd be great! @SidharthBansal how does that sound? @SidharthBansal can probably advise if you need any info, as author of the first part: #1831

Thanks!!

We'd discussed combining the questions and answers items on the profile into one column, and replacing Comments with Activities, since comments is shown on a tab anyways.

The profile page as a whole may get some reorganizing, but once all the code is in there, re-arranging it will be easier!

And if you do submit a PR, please use fixes #928 and we'll close this out!

@jwarren, wouldn't it be great if we will use ajax for the remaining buttons so that we can use the same button.
I studied the show action of the tag controller, it is using different urls for different navbars.I think we should either use ajax there too or we should write different urls for all these button on the /wiki/tag/tagname/author/authorname, /question/tag/tagname/author/authorname etc.
I am more with the second option, because currently public lab users are using /wiki/tag/tagname, so it would be in analogy with it and easier for the user.

@ViditChitkara May I take this if you dont mind, because I was having some ideas and some suggestions on those pages??

By buttons, did you mean the tabs? sorry, just trying to follow your suggestion in my head!

@jywarren yeah the tabs for the comment, question, wiki pages, maps, and contributors.

Right now, we have tabs to the /wiki/tag/tagname, maps/tag/tagname, question/tag/tagname for the controllers show action.
So, I was thinking, we should keep the other tabs also in analogy to this. As /wiki/tag/tagname/author/authorname, /maps/tag/tagname/author/authorname,question/tag/tagname/author/authorname. So that the existing user can easlity adapt.
I am suggesting the ajax for better front end experience to the user. But that might result the routes for the current user, like /question/tag/tagname, wiki/tag/tagname, etc merging into one. And that will lead to many deadlinks at the existing research pages
Also, the contributor tab leads a redirect to a contributors page. That needs to be tackled. It should display the contributors on the similar template as we are using for the /tag/tagname.
@jywarren What do you say?

Hi, sorry for slow reply!

For the last item, i think we're tackling that in https://github.com/publiclab/plots2/pull/2062 ! Good call though.

For the earlier ones, I like the idea that the various routes you name would exist, even if they show up as tabs. Because sometimes you want to send someone a link to one of them!

  • /wiki/tag/tagname/author/authorname
  • /maps/tag/tagname/author/authorname
  • /question/tag/tagname/author/authorname

We should make an issue for these routes changes! I like this a lot. :-)

The last portion of this issue, however, is narrower -- just to add to the middle column of the profile "stats" display (see https://publiclab.org/profile/cfastie), instead of N comments posted, a list of activities posted and completed:

5 activities posted

15 activities attempted

The top could link to (for @cfastie, for example) https://publiclab.org/tag/activity:*/author/cfastie

The bottom could link to https://publiclab.org/tag/replication:*/author/cfastie

And for questions, in the left column, https://publiclab.org/tag/question:*/author/cfastie

We don't yet have a link to answers for an author, but this is still a lot of progress!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grvsachdeva picture grvsachdeva  Â·  3Comments

grvsachdeva picture grvsachdeva  Â·  3Comments

jywarren picture jywarren  Â·  3Comments

keshavsethi picture keshavsethi  Â·  3Comments

first-timers[bot] picture first-timers[bot]  Â·  3Comments