Plots2: Add a button to report answers spams to Comments upon Answers

Created on 16 May 2018  ยท  18Comments  ยท  Source: publiclab/plots2

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!

We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you ๐Ÿ’

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

๐Ÿค” What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

๐Ÿ“‹ Step by Step

  • [ ] ๐Ÿ™‹ Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!

  • [ ] ๐Ÿ“ Update the file app/views/questions/_comment.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

See this page for some help in taking your first steps!

Below is a "diff" showing in green (and a +) with lines to add after line 28 in file (Remember to be careful with the indentation):

<div class="inline pull-xs-right" style="vertical-align: top">
+   <a rel="tooltip" title="Flag as spam" class="btn btn-sm btn-default btn-flag-spam-<%= comment.id %>" href="mailto:[email protected]?subject=Reporting+spam+on+Public+Lab&body=Hi,+I+found+this+comment+that+looks+like+spam+or+needs+to+be+moderated:+https://publiclab.org/<%= comment.parent.path %>#c<%= comment.cid %>+by+https://publiclab.org/profile/<%= comment.author.username %>+Thanks!">
+     <i class="fa fa-flag"></i>
+   </a>
    <p><% if answer_id == 0 && current_user && (current_user.role == "admin" || current_user.role == "moderator" || comment.uid == current_user.uid)%>
    <a class="btn btn-default btn-sm" id="answer-<%= answer_id %>-comment-<%= comment.id %>-reorder-btn" data-remote="true" data-confirm="Are you sure? <% if current_user && comment.uid != current_user.uid %>Please exercise caution in promoting others' comments; this cannot be undone.<% end %>" rel="tooltip" title="<%= t('questions._comment.promotion') %>" data-placement="left" href="/comment/make_answer/<%= comment.id %>"><i class="fa fa-plus"></i></a>
    <% end %>
    <% if current_user && current_user.uid == comment.uid %>
    <a class="btn btn-default btn-sm" onClick="$('#answer-<%= answer_id %>-comment-<%= comment.id %> .content').toggle();$('#answer-<%= answer_id %>-comment-<%= comment.id %> .content-form').toggle();" ><i class="fa fa-pencil"></i></a>
    <% end %>
    <% if current_user && (current_user.role == "admin" || current_user.role == "moderator" || comment.uid == current_user.uid || node.uid == current_user.uid) %>
    <a class="btn btn-default btn-sm" id="answer-<%= answer_id %>-comment-<%= comment.id %>-delete-btn" data-remote="true" data-confirm="Are you sure? <% if current_user && comment.uid != current_user.uid %>Please exercise caution in deleting/moderating others' comments; this cannot be undone.<% end %>" href="/comment/delete/<%= comment.id %>?type=question"><i class='icon fa fa-trash'></i></a>
    <% end %></p>
  </div>
  • [ ] ๐Ÿ’พ Commit your changes

  • [ ] ๐Ÿ”€ Start a Pull Request. There are two ways how you can start a pull request:

  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can also edit files directly in your browser and open a pull request from there.

  • [ ] ๐Ÿ Done Ask in comments for a review :)

๐Ÿค”โ“ Questions?

Leave a comment below!

Is someone else already working on this?

We encourage you to link to this issue by mentioning the issue # in your pull request, so we can see if someone's already started on it. If someone seem stuck, offer them some help! Otherwise, take a look at some other issues you can help with. Thanks!

(This issue was created by First-Timers-Bot.)

first-timers-only

Most helpful comment

Hi! Can I try this one? :)

All 18 comments

Hi! Can I try this one? :)

Yes, sure, @Toiya thanks for the help! If you have any questions, we are here to help :)

@stefannibrasil
So I made the changes and apparantly there are some issues. However, they don't seem to be in the file I changed. Is this a mistake on my part or is it an okay fix anyway? Sorry for the newbie question, I'm completely new to this

Hi, @Toiya That's okay, we are all here to learn :)

Do you mean the codeclimate issues? Yeah, I don't think they are related to your changes at all.

I believe you don't have to worry about it for now, because we are still changing the files to reflect the style code that codeclimate checks, am I right, @publiclab/reviewers @jywarren ? (If not, I can help you with that, for sure).

Thanks, Ill take a look!

IS this issue still open?

Hi @ibrahimelbanna, @Toiya is already working on this issue in pr #2733. You can try other issues. Let us know if you need any help in finding issue.

@namangupta01 yes I need help finding an issue for a new timer contributor.

@namangupta01 hi, I'd like to also help out on any more issues you have for a newbie.

@publiclab/reviewers anyone have a good first timers issue or two to share here?

Thanks everyone for helping out!

Hi, @chanjess I made a new one here: https://github.com/publiclab/plots2/issues/2761

I made another here, although it's especially simple so if you want a tougher one i'll work on that too: https://github.com/publiclab/plots2/issues/2762

@jywarren hey warren
i'm curious about the tougher one too, no guarantee I can fix it tho :P

well, feel free to give it a try and we can help you through it!

On Sun, Jun 3, 2018 at 7:29 PM, chanjess notifications@github.com wrote:

@jywarren https://github.com/jywarren hey warren
i'm curious about the tougher one too, no guarantee I can fix it tho :P

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2732#issuecomment-394211317,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJzovGFUSLnzPSaK8Es0fTFFd07d-ks5t5I2PgaJpZM4UB9Hb
.

is anyone working on this issue? if not i will like to work on it

is anybody working on this...?

I think you're free to take it up, but please link back here from your PR as soon as you begin so we don't have 2 people working redundantly. Thanks!

added spam-button #3016

OK, closing this one out, thank you!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

first-timers[bot] picture first-timers[bot]  ยท  3Comments

grvsachdeva picture grvsachdeva  ยท  3Comments

first-timers[bot] picture first-timers[bot]  ยท  3Comments

divyabaid16 picture divyabaid16  ยท  3Comments

keshavsethi picture keshavsethi  ยท  3Comments