Skip to content

Commit

Permalink
Merge branch 'develop' into wip/jtulach/ReadArgumentCheckNodeHierarch…
Browse files Browse the repository at this point in the history
…y_6165
  • Loading branch information
JaroslavTulach authored Sep 8, 2023
2 parents 5e07025 + 294ee46 commit 74e5ddd
Show file tree
Hide file tree
Showing 146 changed files with 4,741 additions and 1,723 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./run --upload-artifacts ${{ runner.os == 'Linux' }} wasm build
env:
ENSO_AG_GRID_LICENSE_KEY: ${{ secrets.ENSO_AG_GRID_LICENSE_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: failure() && runner.os == 'Windows'
name: List files if failed (Windows)
Expand Down Expand Up @@ -283,6 +284,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./run --upload-artifacts ${{ runner.os == 'Linux' }} wasm build
env:
ENSO_AG_GRID_LICENSE_KEY: ${{ secrets.ENSO_AG_GRID_LICENSE_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: failure() && runner.os == 'Windows'
name: List files if failed (Windows)
Expand Down Expand Up @@ -341,6 +343,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./run --upload-artifacts ${{ runner.os == 'Linux' }} wasm build
env:
ENSO_AG_GRID_LICENSE_KEY: ${{ secrets.ENSO_AG_GRID_LICENSE_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: failure() && runner.os == 'Windows'
name: List files if failed (Windows)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./run --upload-artifacts ${{ runner.os == 'Linux' }} wasm build
env:
ENSO_AG_GRID_LICENSE_KEY: ${{ secrets.ENSO_AG_GRID_LICENSE_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: failure() && runner.os == 'Windows'
name: List files if failed (Windows)
Expand Down
3 changes: 2 additions & 1 deletion app/gui2/.vscode/extensions.json → .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"Vue.vscode-typescript-vue-plugin",
"ms-playwright.playwright",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"andreasxp.auto-snippets"
]
}
22 changes: 22 additions & 0 deletions .vscode/gui2.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Vue single-file component": {
"scope": "vue",
"prefix": "vue sfc",
"isFileTemplate": true,
"body": [
"<script setup lang=\"ts\">",
"const props = defineProps<{$0}>()",
"const emit = defineEmits<{}>()",
"</script>",
"",
"<template>",
"<div class=\"${TM_FILENAME_BASE}\"></div>",
"</template>",
"",
"<style scoped>",
".${TM_FILENAME_BASE} {",
"}",
"</style>"
]
}
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"rust-analyzer.linkedProjects": ["./app/gui2/rust-ffi/Cargo.toml"],
"vue.complete.casing.status": false,
"vue.complete.casing.props": "camel",
"vue.complete.casing.tags": "pascal",
"auto-snippets.snippets": [
{ "language": "vue", "snippet": "Vue single-file component" }
]
}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,7 @@
- [Changed layout of local libraries directory, making it easier to reference
projects next to each other][7634]
- [Support runtime checks of intersection types][7769]
- [Merge `Small_Integer` and `Big_Integer` types][7636]

[3227]: https://github.com/enso-org/enso/pull/3227
[3248]: https://github.com/enso-org/enso/pull/3248
Expand Down Expand Up @@ -1084,6 +1085,7 @@
[7678]: https://github.com/enso-org/enso/pull/7678
[7634]: https://github.com/enso-org/enso/pull/7634
[7769]: https://github.com/enso-org/enso/pull/7769
[7636]: https://github.com/enso-org/enso/pull/7636

# Enso 2.0.0-alpha.18 (2021-10-12)

Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

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

16 changes: 11 additions & 5 deletions app/gui/view/graph-editor/src/builtin/visualization/java_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// TODO remove once we have proper visualizations or replace with a nice d3 example.
// These implementations are neither efficient nor pretty, but get the idea across.

use crate::prelude::*;

use crate::component::visualization;
use crate::component::visualization::java_script::source::from_files;

Expand All @@ -14,11 +16,15 @@ use crate::component::visualization::java_script::source::from_files;

/// Return a `JavaScript` Table visualization.
pub fn table_visualization() -> visualization::java_script::FallibleDefinition {
let source = from_files!(
"java_script/helpers/loading.js",
"java_script/helpers/scrollable.js",
"java_script/table.js"
);
let mut source =
from_files!("java_script/helpers/loading.js", "java_script/helpers/scrollable.js");

let ag_grid_license_key = option_env!("AG_GRID_LICENSE_KEY");
let initializer = ag_grid_license_key.map_or_default(|ag_grid_license_key| {
format!(r#"const AG_GRID_LICENSE_KEY = '{ag_grid_license_key}'\n"#)
});
let content = format!("{initializer}\n{}", include_str!("java_script/table.js"));
source.add_file("java_script/table.js", &content);

visualization::java_script::Definition::new_builtin(source)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/** Table visualization. */
loadScript('https://cdn.jsdelivr.net/npm/ag-grid-community/dist/ag-grid-community.min.js')
// Use the following line instead of the above one to use the enterprise version of ag-grid.
// loadScript('https://cdn.jsdelivr.net/npm/[email protected]/dist/ag-grid-enterprise.min.js')

loadScript('https://cdn.jsdelivr.net/npm/ag-grid-enterprise/dist/ag-grid-enterprise.min.js')

// ============================
// === Style Initialisation ===
Expand Down Expand Up @@ -153,6 +152,13 @@ class TableVisualization extends Visualization {
onColumnResized: e => this.lockColumnSize(e),
suppressFieldDotNotation: true,
}

if (typeof AG_GRID_LICENSE_KEY !== 'undefined') {
agGrid.LicenseManager.setLicenseKey(AG_GRID_LICENSE_KEY)
} else {
console.warn('The AG_GRID_LICENSE_KEY is not defined.')
}

this.agGrid = new agGrid.Grid(tabElem, this.agGridOptions)
}

Expand Down
13 changes: 1 addition & 12 deletions app/gui/view/graph-editor/src/component/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,18 +883,7 @@ impl Node {
model.input.set_node_colors <+ node_colors;
}


// TODO: handle color change. Will likely require moving the node background and backdrop
// into a widget, which is also necessary to later support "split" nodes, where '.' chains
// are displayed as separate shapes.
let colors = [
color::Lcha(0.4911, 0.3390, 0.72658, 1.0),
color::Lcha(0.4468, 0.3788, 0.96805, 1.0),
color::Lcha(0.4437, 0.1239, 0.70062, 1.0),
];
let mut hasher = crate::DefaultHasher::new();
Rc::as_ptr(&model).hash(&mut hasher);
base_color_source.emit(colors[hasher.finish() as usize % colors.len()]);
base_color_source.emit(color::Lcha(0.4911, 0.3390, 0.72658, 1.0));


// Init defaults.
Expand Down
20 changes: 19 additions & 1 deletion app/gui2/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,30 @@ require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-essential',
'plugin:vue/vue3-recommended',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting',
],
parserOptions: {
ecmaVersion: 'latest',
},
ignorePatterns: ['rust-ffi/pkg/**'],
rules: {
camelcase: [
1,
{
ignoreImports: true,
},
],
'no-inner-declarations': 0,
'vue/v-on-event-hyphenation': [2, 'never'],
'@typescript-eslint/no-unused-vars': [
1,
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
},
}
2 changes: 2 additions & 0 deletions app/gui2/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.css
71 changes: 37 additions & 34 deletions app/gui2/package-lock.json

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

5 changes: 3 additions & 2 deletions app/gui2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/",
"yjs-server": "PORT=1234 YPERSISTENCE=./dbDir node ./node_modules/y-websocket/bin/server.js"
"build-rust-ffi": "cd rust-ffi && wasm-pack build --release --target web",
"preinstall": "npm run build-rust-ffi"
},
"dependencies": {
"@types/ws": "^8.5.5",
"@vueuse/core": "^10.4.1",
"lib0": "^0.2.83",
"pinia": "^2.1.6",
Expand All @@ -33,6 +33,7 @@
"@tsconfig/node18": "^18.2.0",
"@types/jsdom": "^21.1.1",
"@types/node": "^18.17.5",
"@types/ws": "^8.5.5",
"@vitejs/plugin-vue": "^4.3.1",
"@vue/eslint-config-prettier": "^8.0.0",
"@vue/eslint-config-typescript": "^11.0.3",
Expand Down
1 change: 1 addition & 0 deletions app/gui2/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-env node */
module.exports = {
plugins: {
autoprefixer: {},
Expand Down
Loading

0 comments on commit 74e5ddd

Please sign in to comment.