plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Display "you are a coauthor" alert on pages where you are listed as a coauthor

Open jywarren opened this issue 9 years ago • 5 comments

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

The problem

Notes (https://publiclab.org/research) can have the tag with:username where username is a person's username. This tag can only be added by the original author, and gives the named person a credit ("by X and Y") as well as (soon, in #761) access to edit the note itself.

Examples can be seen at https://publiclab.org/tag/with:*

But this is not necessarily clear to everybody.

Proposed solution

We should display an alert at the top of the note if the viewer is named as a coauthor, and explain what it means. Text could be:

You are a coauthor of this post. This attributes your contribution, and gives you edit access to the note. Learn more

An alert is a div with class alert alert-success (for example, for a green alert box), and the markup would look like similar alerts shown here:

https://github.com/publiclab/plots2/blob/8ab938d1ad791e64906f6b0c912695bc90be238f/app/views/notes/show.html.erb#L8

But we would also need to check if the viewer is among the named coauthors, which we could do by checking:

@node.coauthors.includes?(current_user)

(i think! that line may need some tweaking!)

See how this works by submitting a pull request and asking for feedback!

Steps to Fix

  • [ ] claim this issue with a comment here, below, and ask any clarifying questions you need
  • [ ] set up a repository locally following the README instructions, and make sure that all tests pass
  • [ ] try to fix the issue following the steps above, but even before you're done, you can:
  • [ ] commit your changes and start a pull request (see contributing to Public Lab software) but mark it as "in progress" if you have questions or if you haven't finished
  • [ ] alert someone via the developers list (see below) to have your pull request merged. This may take a few extra steps depending on when you do it, but we'll help you out!

Please email the developers list (see https://publiclab.org/wiki/developers) if you have questions, and take a look at our first-timers landing page for more information!

jywarren avatar Feb 14 '17 15:02 jywarren

Hello jywarren, i would like to work on this one. As i'm new to open source, doing this will help me to get on track fast.

So i have read some guides in publiclab.com and according to that forked and cloned the plots2 repository to my local machine. What should I do after that?. Maybe I shall install according to the guides in README.md?

aspriya avatar Feb 15 '17 08:02 aspriya

That's right - you want to get to the point where you can run rake test and see everything pass successfully. Thank you for taking this on!

On Wed, Feb 15, 2017 at 3:38 AM, Ashan Priyadarshana < [email protected]> wrote:

Hello jywarren, i would like to work on this one. As i'm new to open source, doing this will help me to get on track fast.

So i have read some guides in publiclab.com and according to that forked and cloned the plots2 repository to my local machine. What should I do after that?. Maybe I shall install according to the guides in README.md?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1260#issuecomment-279949254, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ6wzfm9FV_EmrFCYiChnYPG2FVukks5rcrmggaJpZM4MAnP1 .

jywarren avatar Feb 15 '17 14:02 jywarren

I installed it correctly and all tests pass. But there are about 4 DEPRECATION WARNINGS. Hope that's not a big issue for me to continue. I can understand the question and appreciate any directions to look for. Right now i'm trying to understand notes controller (specially it's show action) and show.html.erb

thanks.

aspriya avatar Feb 15 '17 17:02 aspriya

No, the deprecation warnings are fine, we're working on them but they won't stop you.

OK, please feel free to reach out here or on our Gitter channel for help! https://gitter.im/publiclab/publiclab

On Wed, Feb 15, 2017 at 12:17 PM, Ashan Priyadarshana < [email protected]> wrote:

I installed it correctly and all tests pass. But there are about 4 DEPRECATION WARNING. Hope that's not a big issue for me to continue. I can understand the question and appreciate any directions to look for. Right now i'm trying to understand notes controller (specially it's show action) and show.html.erb

thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1260#issuecomment-280075357, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJwjPPr-0bJo8_ScxYr2UWs52wVOAks5rczMhgaJpZM4MAnP1 .

jywarren avatar Feb 15 '17 17:02 jywarren

Solved in #1267! Thank you!!

jywarren avatar Feb 18 '17 15:02 jywarren