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

Add a button to report answers spams to Comments upon Answers #2732

Closed
stefannibrasil opened this Issue May 16, 2018 · 18 comments

Comments

Projects
None yet
8 participants
@stefannibrasil
Collaborator

stefannibrasil commented May 16, 2018

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:moderators@publiclab.org?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.)

@Toiya

This comment has been minimized.

Toiya commented May 16, 2018

Hi! Can I try this one? :)

@stefannibrasil

This comment has been minimized.

Collaborator

stefannibrasil commented May 16, 2018

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

@Toiya

This comment has been minimized.

Toiya commented May 16, 2018

@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

@stefannibrasil

This comment has been minimized.

Collaborator

stefannibrasil commented May 17, 2018

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).

@jywarren

This comment has been minimized.

Contributor

jywarren commented May 19, 2018

Thanks, Ill take a look!

@ibrahimelbanna

This comment has been minimized.

Member

ibrahimelbanna commented May 27, 2018

IS this issue still open?

@namangupta01

This comment has been minimized.

Member

namangupta01 commented May 27, 2018

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.

@ibrahimelbanna

This comment has been minimized.

Member

ibrahimelbanna commented May 27, 2018

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

@chanjess

This comment has been minimized.

Contributor

chanjess commented Jun 2, 2018

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

@jywarren

This comment has been minimized.

Contributor

jywarren commented Jun 3, 2018

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

Thanks everyone for helping out!

@jywarren

This comment has been minimized.

Contributor

jywarren commented Jun 3, 2018

Hi, @chanjess I made a new one here: #2761

I made another here, although it's especially simple so if you want a tougher one i'll work on that too: #2762

@chanjess

This comment has been minimized.

Contributor

chanjess commented Jun 4, 2018

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

@jywarren

This comment has been minimized.

Contributor

jywarren commented Jun 4, 2018

@dewanhimanshu

This comment has been minimized.

Collaborator

dewanhimanshu commented Jul 6, 2018

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

@CoderJolly

This comment has been minimized.

Contributor

CoderJolly commented Jul 8, 2018

is anybody working on this...?

@jywarren

This comment has been minimized.

Contributor

jywarren commented Jul 9, 2018

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!

@dewanhimanshu

This comment has been minimized.

Collaborator

dewanhimanshu commented Jul 9, 2018

added spam-button #3016

@jywarren

This comment has been minimized.

Contributor

jywarren commented Jul 25, 2018

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

@jywarren jywarren closed this Jul 25, 2018

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