Merge pull request #841 from sharelatex/ns-remove-wufoo-log-links

remove wufoo latex error response logging
This commit is contained in:
Jessica Lawshe 2018-08-29 12:24:22 -05:00 committed by GitHub
commit 3a2400b212
4 changed files with 15 additions and 149 deletions

View file

@ -161,7 +161,6 @@ div.full-size.pdf(ng-controller="PdfController")
'alert-info': entry.level == 'typesetting'\
}"
ng-click="openInEditor(entry)"
ng-init="feedbackSent = false; showNegFeedbackUI = false; negFeedbackReason = ''; negFeedbackReasonFreeText = ''"
)
span.line-no
i.fa.fa-link(aria-hidden="true")
@ -179,7 +178,7 @@ div.full-size.pdf(ng-controller="PdfController")
p.card-hint-text(
ng-show="entry.humanReadableHint",
ng-bind-html="wikiEnabled ? entry.humanReadableHint : stripHTMLFromString(entry.humanReadableHint)")
.card-hint-actions.clearfix
.card-hint-footer.clearfix
.card-hint-ext-link(ng-if="wikiEnabled && entry.extraInfoURL")
a(
ng-href="{{ entry.extraInfoURL }}",
@ -188,67 +187,6 @@ div.full-size.pdf(ng-controller="PdfController")
)
i.fa.fa-external-link
| #{translate("log_hint_extra_info")}
.card-hint-feedback(
ng-hide="feedbackSent || showNegFeedbackUI"
ng-class="entry.ruleId"
)
label.card-hint-feedback-label #{translate("log_hint_feedback_label")}
a.card-hint-feedback-positive(
ng-click="trackLogHintsPositiveFeedback(entry.ruleId); feedbackSent = true;"
href
) #{translate("answer_yes")}
span  / 
a.card-hint-feedback-negative(
ng-click="trackLogHintsNegativeFeedback(entry.ruleId); showNegFeedbackUI = true;"
href
) #{translate("answer_no")}
.card-hint-extra-feedback(ng-hide="!showNegFeedbackUI || feedbackSent")
p.card-hint-extra-feedback-label #{translate("log_hint_ask_extra_feedback")}
.radio: label
input(
type="radio"
name="{{ 'neg-feedback-reason-' + $index }}"
ng-model="negFeedbackReason"
value="{{ logHintsNegFeedbackValues.DIDNT_UNDERSTAND }}"
)
| #{translate("log_hint_extra_feedback_didnt_understand")}
.radio: label
input(
type="radio"
name="{{ 'neg-feedback-reason-' + $index }}"
ng-model="negFeedbackReason"
value="{{ logHintsNegFeedbackValues.NOT_APPLICABLE }}"
)
| #{translate("log_hint_extra_feedback_not_applicable")}
.radio: label
input(
type="radio"
name="{{ 'neg-feedback-reason-' + $index }}"
ng-model="negFeedbackReason"
value="{{ logHintsNegFeedbackValues.INCORRECT }}"
)
| #{translate("log_hint_extra_feedback_incorrect")}
.radio: label
input(
type="radio"
name="{{ 'neg-feedback-reason-' + $index }}"
ng-model="negFeedbackReason"
value="{{ logHintsNegFeedbackValues.OTHER }}"
)
| #{translate("log_hint_extra_feedback_other")}
textarea.form-control(
ng-show="negFeedbackReason === logHintsNegFeedbackValues.OTHER"
ng-model="negFeedbackReasonFreeText"
rows="2"
)
.clearfix
button.btn.btn-default.btn-sm.pull-right(
ng-disabled="!negFeedbackReason"
ng-click="trackLogHintsNegFeedbackDetails(entry.ruleId, negFeedbackReason, negFeedbackReasonFreeText); feedbackSent = true;"
) #{translate("log_hint_extra_feedback_submit")}
.card-hint-feedback(ng-show="feedbackSent")
label.card-hint-feedback-label #{translate("log_hint_feedback_gratitude")}
p.entry-content(ng-show="entry.content") {{ entry.content.trim() }}

View file

@ -3,7 +3,6 @@ define [
"ace/ace"
"ide/human-readable-logs/HumanReadableLogs"
"libs/bib-log-parser"
"services/log-hints-feedback"
], (App, Ace, HumanReadableLogs, BibLogParser) ->
AUTO_COMPILE_MAX_WAIT = 5000
# We add a 1 second debounce to sending user changes to server if they aren't
@ -16,7 +15,7 @@ define [
return (url)-> return $sce.trustAsResourceUrl(url);
])
App.controller "PdfController", ($scope, $http, ide, $modal, synctex, event_tracking, logHintsFeedback, localStorage) ->
App.controller "PdfController", ($scope, $http, ide, $modal, synctex, event_tracking, localStorage) ->
# enable per-user containers by default
perUserCompile = true
autoCompile = true
@ -42,22 +41,9 @@ define [
$scope.$applyAsync () ->
$scope.shouldDropUp = getFilesDropdownTopCoordAsRatio() > 0.65
# log hints tracking
$scope.logHintsNegFeedbackValues = logHintsFeedback.feedbackOpts
$scope.trackLogHintsLearnMore = () ->
event_tracking.sendMB "logs-hints-learn-more"
trackLogHintsFeedback = (isPositive, hintId) ->
event_tracking.send "log-hints", (if isPositive then "feedback-positive" else "feedback-negative"), hintId
event_tracking.sendMB (if isPositive then "log-hints-feedback-positive" else "log-hints-feedback-negative"), { hintId }
$scope.trackLogHintsNegFeedbackDetails = (hintId, feedbackOpt, feedbackOtherVal) ->
logHintsFeedback.submitFeedback hintId, feedbackOpt, feedbackOtherVal
$scope.trackLogHintsPositiveFeedback = (hintId) -> trackLogHintsFeedback true, hintId
$scope.trackLogHintsNegativeFeedback = (hintId) -> trackLogHintsFeedback false, hintId
if ace.require("ace/lib/useragent").isMac
$scope.modifierKey = "Cmd"
else
@ -69,9 +55,9 @@ define [
if qs_args.length then "?" + qs_args.join("&") else ""
$scope.stripHTMLFromString = (htmlStr) ->
tmp = document.createElement("DIV")
tmp.innerHTML = htmlStr
return tmp.textContent || tmp.innerText || ""
tmp = document.createElement("DIV")
tmp.innerHTML = htmlStr
return tmp.textContent || tmp.innerText || ""
$scope.$on "project:joined", () ->
return if !autoCompile

View file

@ -1,58 +0,0 @@
define [
"base"
], (App) ->
App.factory "logHintsFeedback", ($http, $q) ->
hintsFeedbackFormAPIHash = "rl4xgvr1v5t64a"
idStampVal = "OPkEWEFHUFAm7hKlraQMhiOXQabafWo8NipRvLT397w="
hintFieldAPIId = "3"
reasonFieldAPIId = "1"
reasonOtherFieldAPIId = "1_other_other"
submitEndpoint = "https://sharelatex.wufoo.eu/forms/#{ hintsFeedbackFormAPIHash }/#public"
feedbackOpts =
DIDNT_UNDERSTAND: "didnt_understand"
NOT_APPLICABLE: "not_applicable"
INCORRECT: "incorrect"
OTHER: "other"
createRequest = (hintId, feedbackOpt, feedbackOtherVal = "") ->
formData = new FormData()
formData.append "Field#{ hintFieldAPIId }", hintId
formData.append "Field#{ reasonFieldAPIId }", feedbackOpt
formData.append "idstamp", idStampVal
# Allow user to specify "other" without any extra details; an empty string
# would trigger an error submitting.
if feedbackOpt == feedbackOpts.OTHER and feedbackOtherVal == ""
formData.append "Field#{ reasonOtherFieldAPIId }", "#{ feedbackOpts.OTHER } empty"
else
formData.append "Field#{ reasonOtherFieldAPIId }", feedbackOtherVal
req =
method: 'POST'
url: submitEndpoint
# This will effectively disable Angular's default serialization mechanisms,
# forcing the XHR to be done with whatever data we provide (in this case,
# form data). Without this, Angular will forcefully try to serialize data
# to JSON.
transformRequest: angular.identity
data: formData
headers :
# This will tell Angular to use the browser-provided value, which is
# computed according to the data being sent (in this case, multipart
# form + browser-specific multipart boundary). Without this, Angular
# will set JSON.
"Content-Type": undefined
return req
submitFeedback = (hintId, feedbackOpt, feedbackOtherVal = "") ->
submitRequest = createRequest hintId, feedbackOpt, feedbackOtherVal
$http(submitRequest)
service =
feedbackOpts: feedbackOpts
submitFeedback: submitFeedback
return service

View file

@ -305,25 +305,25 @@
line-height: 1.3;
padding: 0 2px;
}
.synctex-control-goto-pdf > .synctex-control-icon when (@is-overleaf = true) {
text-indent: 1px; // "Optical" adjustment.
&::before {
content: "\f061";
content: "\f061";
}
}
.synctex-control-goto-code > .synctex-control-icon when (@is-overleaf = true) {
text-indent: -1px; // "Optical" adjustment.
&::before {
content: "\f060";
content: "\f060";
}
}
.synctex-control-goto-pdf > .synctex-control-icon::before when (@is-overleaf = false) {
content: "\f178";
content: "\f178";
}
.synctex-control-goto-code > .synctex-control-icon::before when (@is-overleaf = false) {
content: "\f177";
content: "\f177";
}
.editor-dark {
@ -401,7 +401,7 @@
}
&-text,
&-text,
&-feedback-label {
color: @log-hints-color;
font-size: 0.9rem;
@ -424,8 +424,8 @@
display: inline-block;
font-size: 0.8rem;
}
&-actions a,
&-footer a,
&-text a {
.alert-danger & {
color: @state-danger-text;
@ -492,7 +492,7 @@
.plv-text-layer {
display: none;
user-select: text;
.pdf-page-container:hover &,
.pdfjs-viewer-show-text & {
display: block;