Skip to content

Bump ace and fix VWidget #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@openc3/tool-common": "5.2.1-beta0",
"ace-builds": "1.13.0",
"ace-builds": "1.14.0",
"axios": "0.27.2",
"date-fns": "2.29.3",
"lodash": "4.17.21",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@openc3/tool-common": "5.2.1-beta0",
"ace-builds": "1.13.0",
"ace-builds": "1.14.0",
"axios": "0.27.2",
"binary-search": "1.3.6",
"date-fns": "2.29.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ export default {
},
},
},
mounted: function () {
mounted: async function () {
// Wait for things to render per https://github.com/ajaxorg/ace/issues/5012
await new Promise((r) => setTimeout(r, 300))
this.editor = ace.edit('editor')
this.editor.setTheme('ace/theme/twilight')
const screenMode = this.buildScreenMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ export default {
// Only convert the first 32 bytes before adding an ellipse
// TODO: Handle units on a BLOCK item
// TODO: Render data in a BLOCK item as bytes (instead of ASCII)
if (value['json_class'] === 'String' && value['raw'] !== undefined) {
if (
value &&
value['json_class'] === 'String' &&
value['raw'] !== undefined
) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a critical bug fix that prevents and values from being displayed in TlmViewer screens. Introduced in my last binary display PR.

let result = Array.from(value['raw'].slice(0, 32), function (byte) {
return ('0' + (byte & 0xff).toString(16)).slice(-2)
})
Expand Down
8 changes: 4 additions & 4 deletions openc3-cosmos-init/plugins/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2217,10 +2217,10 @@ accepts@^1.3.5, accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8:
mime-types "~2.1.34"
negotiator "0.6.3"

ace-builds@1.13.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.13.0.tgz#07529463638b803c3c062126cdbc0d3e884861a7"
integrity sha512-KGS/bfBK+OY5unl3KDXdGvvlvKRQPllLeVsSf1gVxqL97agPxO3WzrepkuFdZSUiMcJThf3jCrZ4r51bb1ObRg==
ace-builds@1.14.0:
version "1.14.0"
resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.14.0.tgz#85a6733b4fa17b0abc3dbfe38cd8d823cad79716"
integrity sha512-3q8LvawomApRCt4cC0OzxVjDsZ609lDbm8l0Xl9uqG06dKEq4RT0YXLUyk7J2SxmqIp5YXzZNw767Dr8GKUruw==

acorn-import-assertions@^1.7.6:
version "1.8.0"
Expand Down