No more codemirror ld-json, fixed sidebar footer css overflow, added bracket closing

This commit is contained in:
Gregory Schier 2016-12-21 23:24:28 -08:00
parent d58edf1d25
commit b97a0ef7a9
5 changed files with 11 additions and 12 deletions

View File

@ -54,7 +54,7 @@ class Toast extends Component {
// Fade the notification in
setTimeout(() => this.setState({visible: true}), 1000);
trackEvent('Notification', 'Shown', notification.key);
trackEvent('Notification', 'Shown', notification.key, {nonInteraction: true});
};
_loadSeen () {

View File

@ -30,6 +30,7 @@ import 'codemirror/addon/display/autorefresh';
import 'codemirror/addon/search/search';
import 'codemirror/addon/search/searchcursor';
import 'codemirror/addon/edit/matchbrackets';
import 'codemirror/addon/edit/closebrackets';
import 'codemirror/addon/search/matchesonscrollbar';
import 'codemirror/addon/search/matchesonscrollbar.css';
import 'codemirror/addon/fold/foldgutter';
@ -56,6 +57,7 @@ const BASE_CODEMIRROR_OPTIONS = {
lint: true,
tabSize: 4,
matchBrackets: true,
autoCloseBrackets: true,
indentUnit: 4,
indentWithTabs: true,
gutters: [
@ -227,12 +229,6 @@ class Editor extends Component {
// Strip of charset if there is one
options.mode = options.mode ? options.mode.split(';')[0] : 'text/plain';
if (this._isJSON(options.mode)) {
// set LD JSON because it highlights the keys a different color
options.mode = {name: 'javascript', jsonld: true}
}
Object.keys(options).map(key => {
this.codeMirror.setOption(key, options[key]);
});

View File

@ -190,10 +190,6 @@
color: lighten(@surprise, 5);
}
.cm-s-default span.cm-property, .cm-s-default span.cm-attribute {
color: lighten(@success, 5);
}
.cm-s-default span.cm-keyword {
color: #f92672;
}
@ -206,6 +202,10 @@
color: lighten(@notice, 5);
}
.cm-s-default span.cm-property, .cm-s-default span.cm-attribute {
color: lighten(@success, 5);
}
.cm-s-default span.cm-variable {
color: #f8f8f2;
}

View File

@ -354,10 +354,13 @@
.sidebar__footer {
height: @line-height-xs;
border-top: 1px solid @hl-md;
width: 100%;
overflow: hidden;
}
.sidebar__footer > button,
.sidebar__footer .dropdown > button {
background: red;
font-size: @font-size-sm;
padding: @padding-xs @padding-md;
height: 100%;

View File

@ -95,7 +95,7 @@
"dependencies": {
"analytics-node": "^2.1.0",
"classnames": "^2.2.3",
"codemirror": "^5.18.2",
"codemirror": "^5.22.0",
"electron-context-menu": "^0.4.0",
"electron-cookies": "^1.1.0",
"electron-squirrel-startup": "^1.0.0",