Removed bug reports from app (#1565)

* remove bug report form and add github link

* update abuse report email templates

* remove bug-report logic

* remove emoji from form

* remove revised500 page
This commit is contained in:
Jess Lee 2019-01-16 11:28:59 -05:00 committed by Ben Halpern
parent 9736d411d3
commit 5bacb4e8c1
6 changed files with 43 additions and 260 deletions

View file

@ -10,9 +10,6 @@ class FeedbackMessagesController < ApplicationController
if recaptcha_verified? && @feedback_message.save
send_slack_message
redirect_to "/feedback_messages"
elsif feedback_message_params[:feedback_type] == "bug-reports"
flash[:notice] = "Make sure the forms are filled 🤖 "
render file: "public/500.html", status: 500, layout: false
else
flash[:notice] = "Make sure the forms are filled 🤖 "
@previous_message = feedback_message_params[:message]
@ -61,8 +58,6 @@ class FeedbackMessagesController < ApplicationController
case feedback_type
when "abuse-reports"
"cry"
when "bug-reports"
"face_with_head_bandage"
else
"robot_face"
end

View file

@ -1,51 +1,49 @@
module FeedbackMessagesHelper
def offender_email_details
body = <<~HEREDOC
Hi [*USERNAME*],
Hi,
All dev.to members are expected to help foster a welcoming environment for the community and abide by our terms and conditions of use. It's been brought to our attention that you may have violated our code of conduct. If this behavior continues, we will need to ban your posting privileges on dev.to.
All DEV members are expected to help foster a welcoming environment for the community. It's been brought to our attention that you have violated our code of conduct and/or terms of use. If this behavior continues, we will need to ban your posting privileges on dev.to.
If you think there's been a mistake, please reply to this email and we'll sort it out.
Thanks,
dev.to team
DEV team
HEREDOC
{
subject: "DEV Report Status Update",
subject: "DEV Code of Conduct Violation",
body: body
}.freeze
end
def reporter_email_details
body = <<~HEREDOC
Hi [*USERNAME*],
Hi!,
We wanted to say thank you for flagging a [*comment/post*] that was in violation of the dev.to code of conduct and terms of service. Your action has helped us continue our work of fostering an open and welcoming community.
We wanted to say thank you for flagging content that may be in violation of the DEV code of conduct and/or terms of use. We'll be looking into your report.
We've also removed the offending posts and reached out to the offender(s).
Thank you for the support.
Thanks again for being a great part of the community.
PBJ
DEV Team
HEREDOC
{
subject: "dev.to Status Update",
subject: "DEV Report",
body: body
}.freeze
end
def affected_email_details
body = <<~HEREDOC
Hi [*USERNAME*],
Hi,
We noticed some comments (made by others) on your [*post/comment*] that violated the dev.to code of conduct. We want you to know that we have zero tolerance for such behavior, and have removed the offending posts and reached out to the offender(s).
We noticed some comments (made by others) on your post that violated the DEV code of conduct and/or terms of use. We want you to know that we have zero tolerance for such behavior and are taking appropriate action.
Thanks for being awesome and please don't hesitate to email us with any questions. We welcome all feedback and ideas as we continue our work of fostering an open and welcoming community.
PBJ
DEV Team
HEREDOC
{
subject: "Courtesy Notice from dev.to",
subject: "Courtesy Notice from DEV",
body: body
}.freeze
end

View file

@ -211,13 +211,6 @@
return
}
if(emailBody.includes("[*") || emailBody.includes("*]")) {
alert.style.display = 'inline-block';
alert.classList.add("alert-warning");
alert.innerHTML = "Username or (comment/post) wasn't changed!"
return
}
var formData = new FormData();
formData.append('feedback_message_id', id);
formData.append('email_to', emailToAddress);

View file

@ -1,46 +1,41 @@
<%= render "style" %>
<h3 class="top-nav">
<a href="/internal/reports?state=abuse-reports&status=Open" class="<%= "active-state" if @feedback_type == "abuse-reports" %>">Abuse Reports</a> |
<a href="/internal/reports?state=bug-reports&status=Open" class="<%= "active-state" if @feedback_type == "bug-reports" %>">Bug Reports</a>
<hr>
<h1 class="top-nav">
Abuse Reports -
<a href="/internal/reports?state=<%= @feedback_type %>&status=Open" class="<%= "active-state" if @status == "Open" %>">Open/Unresolved</a> |
<a href="/internal/reports?state=<%= @feedback_type %>&status=Resolved" class="<%= "active-state" if @status == "Resolved" %>">Resolved</a> |
<a href="/internal/reports?state=<%= @feedback_type %>&status=Invalid" class="<%= "active-state" if @status == "Invalid" %>">Invalid</a>
</h3>
<h1><%= @feedback_type.titleize %></h1>
</h1>
<hr>
<%= paginate @feedback_messages %>
<% if @feedback_type == "abuse-reports" %>
<% @vomits.each do |reaction| %>
<% next unless reaction.user && reaction.reactable %>
<div class="row">
<div class="inner-row col-md-3">
<strong>🤢 <a href="<%= reaction.user.path %>">@<%= reaction.user.username %></a></strong>
</div>
<div class="inner-row col-md-<%= (params[:status] == "Open" || params[:status].blank?) ? "5" : "9" %>">
<strong><%= reaction.reactable_type %>:</strong> <a href="<%= reaction.reactable.path %>"><%= reaction.reactable.title %></a>
</div>
<% if params[:status] == "Open" || params[:status].blank? %>
<div class="inner-row col-md-2">
<%= form_for [:internal, reaction] do |f| %>
<%= f.hidden_field :status, value: "confirmed" %>
<%= f.submit "CONFIRMED", class: "btn btn-success btn-lg" %>
<% end %>
</div>
<div class="inner-row col-md-2">
<%= form_for [:internal, reaction] do |f| %>
<%= f.hidden_field :status, value: "invalid" %>
<%= f.submit "INVALID", class: "btn btn-danger btn-lg" %>
<% end %>
</div>
<% end %>
<% @vomits.each do |reaction| %>
<% next unless reaction.user && reaction.reactable %>
<div class="row">
<div class="inner-row col-md-3">
<strong>🤢 <a href="<%= reaction.user.path %>">@<%= reaction.user.username %></a></strong>
</div>
<% end %>
<div class="inner-row col-md-<%= (params[:status] == "Open" || params[:status].blank?) ? "5" : "9" %>">
<strong><%= reaction.reactable_type %>:</strong> <a href="<%= reaction.reactable.path %>"><%= reaction.reactable.title %></a>
</div>
<% if params[:status] == "Open" || params[:status].blank? %>
<div class="inner-row col-md-2">
<%= form_for [:internal, reaction] do |f| %>
<%= f.hidden_field :status, value: "confirmed" %>
<%= f.submit "CONFIRMED", class: "btn btn-success btn-lg" %>
<% end %>
</div>
<div class="inner-row col-md-2">
<%= form_for [:internal, reaction] do |f| %>
<%= f.hidden_field :status, value: "invalid" %>
<%= f.submit "INVALID", class: "btn btn-danger btn-lg" %>
<% end %>
</div>
<% end %>
</div>
<% end %>
<br>
<% @feedback_messages.each do |feedback_message| %>
<%= form_for [:internal, feedback_message] do |f| %>
<%= render "feedback_message", f: f, feedback_message: feedback_message %>

View file

@ -55,7 +55,7 @@
</style>
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body>
<!-- This file lives in public/500.html -->
<div class="dialog">
@ -64,20 +64,7 @@
<h1>500 Error</h1>
<h2>It's not you, it's me.</h2>
</div>
<form action="/feedback_messages" accept-charset="UTF-8" method="post">
<input name="utf8" type="hidden" value="&#x2713;" />
<input name="feedback_message[feedback_type]" type="hidden" value="bug-reports" />
<input type="hidden" name="feedback_message[reported_url]" value="">
<input type="hidden" name="feedback_message[category]" value="bug">
<div class="field">
<textarea name="feedback_message[message]" placeholder="If you would like to describe the situation that lead to this error, it would be appreciated :)" required></textarea>
</div>
<div class="g-recaptcha" data-sitekey="6LeKoSQUAAAAAI8RhYb0H8NDt8_4hISOA5sN4Elx"></div>
<div class="actions">
<input type="submit" name="commit" value="Send Feedback"/>
</div>
</form>
<p style="margin: 10%">Sorry you're hitting this page. <br> Please help us by submitting a <a href="https://github.com/thepracticaldev/dev.to/issues/new?template=bug_report.md">bug report</a>. <br>Thank you!</p>
</div>
</body>
</html>

View file

@ -1,185 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>We're sorry, but something went wrong (500)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
#container {
display: flex;
}
@media screen and (max-width: 799px) and (min-width: 1px) {
#container > div:first-child {
margin: auto;
}
}
@media screen and (max-width: 1920px) and (min-width: 800px) {
#container > div:first-child {
margin-right: auto;
}
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
}
@media screen and (max-width: 1920px) and (min-width: 800px) {
.dialog{
background:rgb(236, 236, 236);
border:1px solid rgb(217, 217, 217);
text-align:center;
padding:20px 20px;
color:blue;
max-width:50%;
color:rgb(44, 46, 50);
border-radius:5px;
}
}
@media screen and (max-width: 800px) and (min-width: 1px) {
.dialog{
background:rgb(236, 236, 236);
border:1px solid rgb(217, 217, 217);
text-align:center;
padding:20px 20px;
margin: 20px 20px 20px 20px;
max-width:100%;
color:rgb(44, 46, 50);
border-radius:5px;
}
}
#options{
text-align:left;
}
textarea{
width:75%;
height:100px;
border:1px solid rgb(182, 182, 182);
border-radius:3px;
padding:8px;
font-size:14px;
}
input[type="submit"]{
width:50%;
padding:10px;
background:rgb(12, 181, 140);
color:white;
border:0px;
border-radius:3px;
font-size:15px;
margin-top:5px;
cursor:pointer;
}
@media screen and (max-width: 1920px) and (min-width: 800px) {
#img{
max-width:50%;
width: 750px;
padding:10px;
}
}
@media screen and (max-width: 799px) and (min-width: 1px) {
#img{
display: none;
}
}
#call-to-action{
font-size:20px;
text-align:left;
}
.top-bar .logo{
width:51px;
height:30px;
padding:5px 8px 4px 10px;
margin-top: 5px;
fill: white;
background: black:
}
.top-bar nav .nav-search-form input{
width: calc(30vw - 10px);
border-radius: 20px;
border: 1px solid #dedada;
padding: 4px 12px 5px;
font-size: 0.8em;
background: #f5f6f7;
webkit-appearance: none;
}
.top-bar nav{
max-width: 99%;
width: 1250px;
margin: auto;
position: relative;
}
input{
text-rendering: auto;
color: initial;
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
display: inline-block;
text-align: start;
margin: 0em;
font: 11px system-ui;
-webkit-writing-mode: horizontal-tb;
}
</style>
</head>
<body>
<div id="container">
<div id="img">
<img alt="500 error" src="catmeme.png" style='width:100%;' border="0" alt="Null" />
</div>
<div class="dialog">
<div>
<h1>500:Internal Server Error</h1>
<h2>Oops, this isn't where you were trying to go...</h2>
<div id="call-to-action">Don't worry though, you can return to our homepage by clicking <strong><a href="/">here</a></strong>.
<br>
<br>
<h5>But perhaps this is an opportunity, would you like to:</h5>
<div id="options">
<ol>
<li>
Explore some great <a href="/t/error">articles</a> the DEV community has written about errors.
</li>
<li>
Learn more about <a href="https://www.google.com/search?q=http+errors+explained&oq=http+errors+explained&gs_l=psy-ab.3..0j0i22i30k1.12420.13930.0.14153.10.10.0.0.0.0.135.1092.4j6.10.0....0...1.1.64.psy-ab..0.10.1091.9ZVfWfG4nMs">HTTP errors.</a>
</li>
<li>
Bravely help us debug this error.
</li>
</ol>
</div>
</div>
</div>
<form action="/feedback_messages" accept-charset="UTF-8" method="post">
<input name="utf8" type="hidden" value="&#x2713;" />
<input name="feedback_type" type="hidden" value="bug-reports" />
<div class="field">
<textarea name="feedback" placeholder="If you would like to describe the situation that lead to this error, it would be appreciated :)"></textarea>
</div>
<div class="actions">
<input type="submit" name="commit" value="Send Feedback" />
</div>
</form>
</div>
</div>
</body>
</html>