From 91cbf2b321974231821ea258d5be34803ece5006 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Fri, 24 Jun 2016 11:56:31 +0100 Subject: [PATCH 1/4] Links within hint content also open in a new tab. --- .../HumanReadableLogsRules.coffee | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogsRules.coffee b/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogsRules.coffee index 9064c95575..b4cb138be8 100644 --- a/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogsRules.coffee +++ b/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogsRules.coffee @@ -8,7 +8,7 @@ define -> [ regexToMatch: /Extra alignment tab has been changed to \\cr/ extraInfoURL: "https://www.sharelatex.com/learn/Errors:Extra_alignment_tab_has_been_changed_to_%5Ccr" humanReadableHint: """ - You have written too many alignment tabs in a table, causing one of them to be turned into a line break. Make sure you have specified the correct number of columns in your table. + You have written too many alignment tabs in a table, causing one of them to be turned into a line break. Make sure you have specified the correct number of columns in your table. """ , regexToMatch: /Display math should end with \$\$/ @@ -20,7 +20,7 @@ define -> [ regexToMatch: /Missing [{$] inserted./ extraInfoURL: "https://www.sharelatex.com/learn/Errors:Missing_$_inserted" humanReadableHint: """ - Check that your $'s match around math expressions. If they do, then you've probably used a symbol in normal text that needs to be in math mode. Symbols such as subscripts ( _ ), integrals ( \\int ), Greek letters ( \\alpha, \\beta, \\delta ), and modifiers (\\vec{x}, \\tilde{x} ) must be written in math mode. See the full list here. + Check that your $'s match around math expressions. If they do, then you've probably used a symbol in normal text that needs to be in math mode. Symbols such as subscripts ( _ ), integrals ( \\int ), Greek letters ( \\alpha, \\beta, \\delta ), and modifiers (\\vec{x}, \\tilde{x} ) must be written in math mode. See the full list here. """ , regexToMatch: /(undefined )?[rR]eference(s)?.+(undefined)?/ @@ -44,13 +44,13 @@ define -> [ regexToMatch: /`!?h' float specifier changed to `!?ht'/ extraInfoURL: "https://www.sharelatex.com/learn/Errors:%60!h%27_float_specifier_changed_to_%60!ht%27." humanReadableHint: """ - The float specifier 'h' is too strict of a demand for LaTeX to place your float in a nice way here. Try relaxing it by using 'ht', or even 'htbp' if necessary. If you want to try keep the float here anyway, check out the float package. + The float specifier 'h' is too strict of a demand for LaTeX to place your float in a nice way here. Try relaxing it by using 'ht', or even 'htbp' if necessary. If you want to try keep the float here anyway, check out the float package. """ , regexToMatch: /No positions in optional float specifier/ extraInfoURL: "https://www.sharelatex.com/learn/Errors:No_positions_in_optional_float_specifier." humanReadableHint: """ - You have forgotten to include a float specifier, which tells LaTeX where to position your figure. Find out more about float specifiers here. + You have forgotten to include a float specifier, which tells LaTeX where to position your figure. Find out more about float specifiers here. """ , regexToMatch: /Undefined control sequence/ @@ -62,13 +62,13 @@ define -> [ regexToMatch: /File .+ not found/ extraInfoURL: "https://www.sharelatex.com/learn/Errors:File_XXX_not_found_on_input_line_XXX." humanReadableHint: """ - The compiler cannot find the file you want to include. Make sure that you have uploaded the file and specified the file location correctly. + The compiler cannot find the file you want to include. Make sure that you have uploaded the file and specified the file location correctly. """ , regexToMatch: /LaTeX Error: Unknown graphics extension: \..+/ extraInfoURL: "https://www.sharelatex.com/learn/Errors:LaTeX_Error:_Unknown_graphics_extension:_.gif." humanReadableHint: """ - The compiler does not recognise the file type of one of your images. Make sure you are using a supported image format for your choice of compiler, and check that there are no periods (.) in the name of your image. + The compiler does not recognise the file type of one of your images. Make sure you are using a supported image format for your choice of compiler, and check that there are no periods (.) in the name of your image. """ , regexToMatch: /LaTeX Error: Unknown float option `H'/ @@ -80,7 +80,7 @@ define -> [ regexToMatch: /LaTeX Error: Unknown float option `.+'/ extraInfoURL: "https://www.sharelatex.com/learn/Errors:LaTeX_Error:_Unknown_float_option_%60H%27." humanReadableHint: """ - You have used a float specifier which the compiler does not understand. You can learn more about the different float options available for placing figures here. + You have used a float specifier which the compiler does not understand. You can learn more about the different float options available for placing figures here. """ , regexToMatch: /LaTeX Error: \\math.+ allowed only in math mode/ From e4a1443d1ded6e4026685ead7427b2cb35860360 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Fri, 24 Jun 2016 12:07:02 +0100 Subject: [PATCH 2/4] Better handling of whitespace. --- services/web/app/views/project/editor/pdf.jade | 2 +- services/web/public/stylesheets/app/editor/pdf.less | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/services/web/app/views/project/editor/pdf.jade b/services/web/app/views/project/editor/pdf.jade index 34c9ece719..c2b27777f8 100644 --- a/services/web/app/views/project/editor/pdf.jade +++ b/services/web/app/views/project/editor/pdf.jade @@ -129,7 +129,7 @@ div.full-size.pdf(ng-controller="PdfController") ) #{translate("answer_no")} .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 }} + p.entry-content(ng-show="entry.content") {{ entry.content.trim() }} p .pull-right diff --git a/services/web/public/stylesheets/app/editor/pdf.less b/services/web/public/stylesheets/app/editor/pdf.less index f77d497eb0..93818ba2c3 100644 --- a/services/web/public/stylesheets/app/editor/pdf.less +++ b/services/web/public/stylesheets/app/editor/pdf.less @@ -217,6 +217,10 @@ margin-bottom: 20px; } + &-text { + min-height: 35px; + } + &-feedback-label { font-size: inherit; margin-right: 0.5em; From 5f7ffb5a8ce4fdd4ba36650cf3cc56444f9b8454 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Fri, 24 Jun 2016 12:12:45 +0100 Subject: [PATCH 3/4] Make hint card area non-clickable. --- services/web/app/views/project/editor/pdf.jade | 5 ++++- services/web/public/stylesheets/app/editor/pdf.less | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/services/web/app/views/project/editor/pdf.jade b/services/web/app/views/project/editor/pdf.jade index c2b27777f8..feeb01049b 100644 --- a/services/web/app/views/project/editor/pdf.jade +++ b/services/web/app/views/project/editor/pdf.jade @@ -106,7 +106,10 @@ div.full-size.pdf(ng-controller="PdfController") span(ng-show="entry.file") {{ entry.file }} span(ng-show="entry.line") , line {{ entry.line }} p.entry-message(ng-show="entry.message") {{ entry.message }} - .card.card-hint(ng-if="entry.humanReadableHint") + .card.card-hint( + ng-if="entry.humanReadableHint" + stop-propagation="click" + ) figure.card-hint-icon-container i.fa.fa-lightbulb-o(aria-hidden="true") p.card-hint-text(ng-show="entry.humanReadableHint", ng-bind-html="entry.humanReadableHint") diff --git a/services/web/public/stylesheets/app/editor/pdf.less b/services/web/public/stylesheets/app/editor/pdf.less index 93818ba2c3..c2ad5895be 100644 --- a/services/web/public/stylesheets/app/editor/pdf.less +++ b/services/web/public/stylesheets/app/editor/pdf.less @@ -181,6 +181,7 @@ .card-hint:extend(.card-thin) { margin-top: 10px; + cursor: default; &-icon-container { background: currentColor; From d7a1c7f693de1c7eea6430c9b8a984f51143de09 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Fri, 24 Jun 2016 14:01:22 +0100 Subject: [PATCH 4/4] Inline links in the hint now match the theme. --- services/web/public/stylesheets/app/editor/pdf.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/public/stylesheets/app/editor/pdf.less b/services/web/public/stylesheets/app/editor/pdf.less index c2ad5895be..db29870c1a 100644 --- a/services/web/public/stylesheets/app/editor/pdf.less +++ b/services/web/public/stylesheets/app/editor/pdf.less @@ -181,6 +181,7 @@ .card-hint:extend(.card-thin) { margin-top: 10px; + padding-bottom: 7px; cursor: default; &-icon-container { @@ -235,7 +236,8 @@ font-size: 0.8rem; } - &-actions a { + &-actions a, + &-text a { .alert-danger & { color: @alert-danger-text; }