diff --git a/src/app/staticanalysis/staticAnalysisView.js b/src/app/staticanalysis/staticAnalysisView.js index 9ef30198da..174c5e37a0 100644 --- a/src/app/staticanalysis/staticAnalysisView.js +++ b/src/app/staticanalysis/staticAnalysisView.js @@ -90,7 +90,7 @@ staticAnalysisView.prototype.run = function () { } warningCount++ var msg = yo`${location} ${item.warning} ${item.more ? yo`
more
` : yo``}
` - self.appAPI.renderWarning(msg, warningContainer, {type: 'warning', useSpan: true}) + self.appAPI.renderWarning(msg, warningContainer, {type: 'staticAnalysisWarning', useSpan: true}) }) }) if (warningContainer.html() === '') { diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index caf04b88db..9d7b71e0f5 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -124,8 +124,8 @@ module.exports = class CompileTab { }) self._events.staticAnalysis.register('staticAnaysisWarning', (count) => { if (count) { - const msg = `Static Analysis raised ${count} warning(s) that requires your attention.` - const settings = { type: 'warning', click: () => self._api.switchTab('staticanalysisView') } + const msg = `Static Analysis raised ${count} warning(s) that requires your attention. Click here to show the warning(s).` + const settings = { type: 'staticAnalysisWarning', click: () => self._api.switchTab('staticanalysisView'), useSpan: true } self._opts.renderer.error(msg, self._view.errorContainer, settings) } }) diff --git a/src/app/ui/renderer.js b/src/app/ui/renderer.js index 404ca550cd..628af1114e 100644 --- a/src/app/ui/renderer.js +++ b/src/app/ui/renderer.js @@ -21,7 +21,7 @@ function Renderer (appAPI) { * * @param {String or DOMElement} message * @param {DOMElement} container - * @param {Object} options {useSpan, noAnnotations, click:(Function), type:(warning, error), errFile, errLine, errCol} + * @param {Object} options {useSpan, noAnnotations, click:(Function), type:(warning, error, staticAnalysisWarning), errFile, errLine, errCol} */ Renderer.prototype.error = function (message, container, opt) { if (!message) return diff --git a/src/app/ui/styles/renderer-styles.js b/src/app/ui/styles/renderer-styles.js index 4ec7b3a008..cc543c60ea 100644 --- a/src/app/ui/styles/renderer-styles.js +++ b/src/app/ui/styles/renderer-styles.js @@ -6,6 +6,7 @@ var styles = styleGuide.chooser() var css = yo`