Adujusted static analysis warning notification appearance.

pull/1/head
dominique934 7 years ago committed by yann300
parent e451d5d14e
commit 35723866b9
  1. 2
      src/app/staticanalysis/staticAnalysisView.js
  2. 4
      src/app/tabs/compile-tab.js
  3. 2
      src/app/ui/renderer.js
  4. 8
      src/app/ui/styles/renderer-styles.js

@ -90,7 +90,7 @@ staticAnalysisView.prototype.run = function () {
}
warningCount++
var msg = yo`<span>${location} ${item.warning} ${item.more ? yo`<span><br><a href="${item.more}" target="blank">more</a></span>` : yo`<span></span>`}</span>`
self.appAPI.renderWarning(msg, warningContainer, {type: 'warning', useSpan: true})
self.appAPI.renderWarning(msg, warningContainer, {type: 'staticAnalysisWarning', useSpan: true})
})
})
if (warningContainer.html() === '') {

@ -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)
}
})

@ -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

@ -6,6 +6,7 @@ var styles = styleGuide.chooser()
var css = yo`<style>
.sol.success,
.sol.error,
.sol.staticAnalysisWarning,
.sol.warning {
word-wrap: break-word;
cursor: pointer;
@ -18,6 +19,7 @@ var css = yo`<style>
.sol.success pre,
.sol.error pre,
.sol.staticAnalysisWarning pre,
.sol.warning pre {
overflow-y: hidden;
background-color: transparent;
@ -29,6 +31,7 @@ var css = yo`<style>
}
.sol.success .close,
.sol.staticAnalysisWarning .close,
.sol.error .close,
.sol.warning .close {
font-weight: bold;
@ -50,6 +53,11 @@ var css = yo`<style>
color: ${styles.rightPanel.message_Warning_Color};
}
.sol.staticAnalysisWarning {
background-color: ${styles.colors.lightViolet};
color: ${styles.colors.black};
}
.sol.success {
background-color: ${styles.rightPanel.message_Success_BackgroundColor};
border: .2em dotted ${styles.rightPanel.message_Success_BorderColor};

Loading…
Cancel
Save