Skip to content

Commit

Permalink
Closes a few issues folks opened recently. (#119)
Browse files Browse the repository at this point in the history
* fix(Ui.CodeEditor): updates to use Evan's version of Elm mode for CM

* fix(*): rm format shortcut copy

* fix(Editor.State.Working): allow ellie to be taken back online

* fix(Ui.Output): update doc selectors to find new debugger
  • Loading branch information
tbash authored Dec 2, 2019
1 parent 7fa6691 commit 19808f7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
5 changes: 2 additions & 3 deletions assets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@dillonkearns/elm-graphql": "^3.2.0",
"@webcomponents/custom-elements": "1.1.0",
"babel-loader": "^8.0.6",
"codemirror": "5.27.4",
"codemirror": "github:tbash/CodeMirror",
"compression-webpack-plugin": "^1.1.11",
"copy-webpack-plugin": "4.5.1",
"css-loader": "^3.2.0",
Expand Down
17 changes: 12 additions & 5 deletions assets/src/Ellie/Ui/CodeEditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,21 @@ code-editor .CodeMirror {
color: #ff6cc9 !important;
}

.CodeMirror .cm-variable {
color: #82b1ff !important;
}

.CodeMirror .cm-def {
color: #decb6b !important;
}

.CodeMirror .cm-variable-2,
.CodeMirror .cm-qualifier {
color: inherit !important;
}

.CodeMirror .CodeMirror-linenumber {
color: #8D8D97 !important;
color: #8d8d97 !important;
}

.CodeMirror-lint-tooltip {
Expand All @@ -54,9 +62,9 @@ code-editor .CodeMirror {
}

.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {
background-image: none !important;
border-bottom-style: dashed;
border-bottom-width: 1px !important;
background-image: none !important;
border-bottom-style: dashed;
border-bottom-width: 1px !important;
}

.CodeMirror-lint-mark-error {
Expand All @@ -67,7 +75,6 @@ code-editor .CodeMirror {
border-bottom-color: #DECB6B;
}


.CodeMirror .cm-tag.cm-bracket {
color: #82b1ff;
}
Expand Down
9 changes: 3 additions & 6 deletions assets/src/Ellie/Ui/Output.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ export default {
var split = firstArg.split(': ')
var label = split[0]
var body = split.slice(1).join(': ')
parent.postMessage({ tag: 'LogReceived', contents: { label: label, body: body } }, '${
window.location.origin
}')
parent.postMessage({ tag: 'LogReceived', contents: { label: label, body: body } }, '${window.location.origin}')
}
oldLog.apply(this, arguments)
}
Expand Down Expand Up @@ -74,11 +72,10 @@ export default {
})
return debuggerWindowProxy
}
var buttonSelector = 'div[style*="z-index: 2147483647"][style*="background-color: rgb(61, 61, 61)"] > div[style*="cursor: pointer"], .elm-mini-controls-button'
var controlsSelector = 'div[style*="z-index: 2147483647"][style*="background-color: rgb(61, 61, 61)"], .elm-mini-controls'
var buttonSelector = 'div[style*="z-index: 2147483647"][style*="background-color: rgb(18, 147, 216)"]'
var overlaySelector = 'div[style*="z-index: 2147483646"][style*="background-color: rgba(200, 200, 200, 0.7)"]'
var styles = document.createElement('style')
styles.textContent = controlsSelector + ' { display: none !important; }'
styles.textContent = buttonSelector + ' { display: none !important; }'
document.head.appendChild(styles)
window.addEventListener('message', function (event) {
switch(event.data.tag) {
Expand Down
4 changes: 2 additions & 2 deletions assets/src/Pages/Editor/State/Working.elm
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,11 @@ subscriptions model =
, Effects.networkStatus
|> Subscription.map
(\online ->
if online then
if online == model.connected then
NoOp

else
OnlineStatusChanged False
OnlineStatusChanged online
)
, Subscription.map EditorActionPerformed Effects.keyCombos
]
Expand Down
2 changes: 1 addition & 1 deletion assets/src/Pages/Editor/Views/Editors.elm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ view config =
, minSize = 24
, first =
Html.div [ containerStyles ]
[ viewEditorHeader config "Elm" "Format Elm Code (⇧⌥F)" config.onFormat <| Icon.view Icon.Format
[ viewEditorHeader config "Elm" "Format Elm Code" config.onFormat <| Icon.view Icon.Format
, Html.div [ editorStyles ]
[ CodeEditor.view
[ CodeEditor.value config.elmCode
Expand Down

0 comments on commit 19808f7

Please sign in to comment.