Skip to content
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

feat(editor): New Code editor based on the TypeScript language service #12285

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2b747c3
Code editor composable WIP
elsmr Aug 26, 2024
09a4673
Merge branch 'master' into node-1466-overhaul-code-node-p0
elsmr Sep 16, 2024
d9d0502
Finish useCodeEditor refactor
elsmr Sep 16, 2024
a227554
Typescript Web Worker WIP
elsmr Sep 17, 2024
c48eb3f
Make code editor experience more VSCode-like
elsmr Sep 21, 2024
a2057a3
Merge branch 'master' into node-1466-overhaul-code-node-p0
elsmr Sep 21, 2024
f3eac59
TS worker Tweaks
elsmr Sep 23, 2024
4296662
Merge branch 'master' into node-1466-overhaul-code-node-p0
elsmr Oct 29, 2024
406aeb0
WIP
elsmr Oct 30, 2024
5359761
Split types
elsmr Nov 13, 2024
7f583b0
WIP: autocomplete node data with $('NodeName')
elsmr Nov 18, 2024
72ece83
Lazy load node schema for autocomplete
elsmr Nov 20, 2024
37a2081
Add support for $json etc.
elsmr Nov 22, 2024
780d1ff
Add types for each code execution mode
elsmr Nov 25, 2024
ad751eb
Merge branch 'master' into node-1466-overhaul-code-node-p0
elsmr Nov 25, 2024
ae88db8
Fix out of range bugs
elsmr Nov 27, 2024
3d69cbf
Fix worker build
elsmr Nov 27, 2024
5da0340
Add global DateTime type
elsmr Nov 28, 2024
0a4ef73
Merge branch 'master' into node-1466-overhaul-code-node-p0
elsmr Nov 29, 2024
9f2b007
Remove extension functions from code node
elsmr Dec 2, 2024
59bd2ad
WIP: Add updateNodeTypes function
elsmr Dec 2, 2024
cb6daf8
Merge branch 'master' into node-1466-overhaul-code-node-p0
elsmr Dec 2, 2024
1eee234
Dynamically load types when data changes
elsmr Dec 3, 2024
87a0503
Add format shortcut
elsmr Dec 5, 2024
1c6a008
Remove hardcoded JS globals, improve lazy type loading
elsmr Dec 5, 2024
7a30212
Add JS snippets
elsmr Dec 9, 2024
f1d3675
Improve tooltip styling
elsmr Dec 9, 2024
e80402b
Merge branch 'master' into node-1466-overhaul-code-node-p0
elsmr Dec 9, 2024
f41b804
Add drag'n'drop in all code node modes, improve styling
elsmr Dec 10, 2024
faddbdd
Add docs to typescript hover
elsmr Dec 12, 2024
ce99bf5
Fix fullscreen modal, fix restore editor from local storage
elsmr Dec 17, 2024
abd9d44
Merge branch 'master' into node-1466-overhaul-code-node-p0
elsmr Dec 18, 2024
d3fa42c
Refactor and clean up code
elsmr Dec 18, 2024
2a43a5b
Fix typescript compilation issues
elsmr Dec 18, 2024
b90ea5a
Merge branch 'master' into node-1466-overhaul-code-node-p0
elsmr Dec 18, 2024
9dceb02
Add support for binary autocompletion
elsmr Dec 18, 2024
93d039e
Fix prefix match function
elsmr Dec 20, 2024
4fe1f7c
Improve comment completion, make filtering consistent with expressions
elsmr Dec 20, 2024
d8e87d3
Improve return type of code node
elsmr Dec 20, 2024
0bcb8cd
Fix expression autocomplete styles
elsmr Dec 20, 2024
6cde8c4
Remove hardcoded mention of luxon package
elsmr Dec 20, 2024
3dd50c1
Restore line highlighting, fix selection color
elsmr Dec 20, 2024
352a339
Set cursor correctly for function completions
elsmr Dec 20, 2024
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
1 change: 1 addition & 0 deletions packages/design-system/src/css/_primitives.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
--prim-gray-490: hsl(var(--prim-gray-h), 3%, 51%);
--prim-gray-420: hsl(var(--prim-gray-h), 4%, 58%);
--prim-gray-320: hsl(var(--prim-gray-h), 10%, 68%);
--prim-gray-320-alpha-010: hsla(var(--prim-gray-h), 10%, 68%, 0.1);
--prim-gray-200: hsl(var(--prim-gray-h), 18%, 80%);
--prim-gray-120: hsl(var(--prim-gray-h), 25%, 88%);
--prim-gray-70: hsl(var(--prim-gray-h), 32%, 93%);
Expand Down
35 changes: 23 additions & 12 deletions packages/design-system/src/css/_tokens.dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,20 @@
--color-infobox-examples-border-color: var(--prim-gray-670);

// Code
--color-code-tags-string: var(--prim-color-alt-f-tint-150);
--color-code-tags-primitive: var(--prim-color-alt-b-shade-100);
--color-code-tags-keyword: var(--prim-color-alt-g-tint-150);
--color-code-tags-operator: var(--prim-color-alt-h);
--color-code-tags-variable: var(--prim-color-primary-tint-100);
--color-code-tags-definition: var(--prim-color-alt-e);
--color-code-tags-string: #9ecbff;
--color-code-tags-regex: #9ecbff;
--color-code-tags-primitive: #79b8ff;
--color-code-tags-keyword: #f97583;
--color-code-tags-variable: #79b8ff;
--color-code-tags-parameter: #e1e4e8;
--color-code-tags-function: #b392f0;
--color-code-tags-constant: #79b8ff;
--color-code-tags-property: #79b8ff;
--color-code-tags-type: #b392f0;
--color-code-tags-class: #b392f0;
--color-code-tags-heading: #79b8ff;
--color-code-tags-invalid: #f97583;
--color-code-tags-comment: #6a737d;
--color-json-default: var(--prim-color-secondary-tint-200);
--color-json-null: var(--color-danger);
--color-json-boolean: var(--prim-color-alt-a);
Expand All @@ -155,15 +163,18 @@
--color-json-brackets-hover: var(--prim-color-alt-e);
--color-json-line: var(--prim-gray-200);
--color-json-highlight: var(--color-background-base);
--color-code-background: var(--prim-gray-800);
--color-code-background: var(--prim-gray-820);
--color-code-background-readonly: var(--prim-gray-740);
--color-code-lineHighlight: var(--prim-gray-740);
--color-code-lineHighlight: var(--prim-gray-320-alpha-010);
--color-code-foreground: var(--prim-gray-70);
--color-code-caret: var(--prim-gray-10);
--color-code-selection: var(--prim-color-alt-e-alpha-04);
--color-code-gutterBackground: var(--prim-gray-670);
--color-code-gutterForeground: var(--prim-gray-320);
--color-code-tags-comment: var(--prim-gray-200);
--color-code-selection: #3392ff44;
--color-code-selection-highlight: #17e5e633;
--color-code-gutter-background: var(--prim-gray-820);
--color-code-gutter-foreground: var(--prim-gray-320);
--color-code-gutter-foreground-active: var(--prim-gray-10);
--color-code-indentation-marker: var(--prim-gray-740);
--color-code-indentation-marker-active: var(--prim-gray-670);
--color-line-break: var(--prim-gray-420);
--color-code-line-break: var(--prim-color-secondary-tint-100);

Expand Down
35 changes: 23 additions & 12 deletions packages/design-system/src/css/_tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,20 @@
--color-infobox-examples-border-color: var(--color-foreground-light);

// Code
--color-code-tags-string: var(--prim-color-alt-f);
--color-code-tags-primitive: var(--prim-color-alt-b-shade-100);
--color-code-tags-keyword: var(--prim-color-alt-g);
--color-code-tags-operator: var(--prim-color-alt-h);
--color-code-tags-variable: var(--prim-color-alt-c-shade-100);
--color-code-tags-definition: var(--prim-color-alt-e-shade-150);
--color-code-tags-string: #032f62;
--color-code-tags-regex: #032f62;
--color-code-tags-primitive: #005cc5;
--color-code-tags-keyword: #d73a49;
--color-code-tags-variable: #e36209;
--color-code-tags-parameter: #24292e;
--color-code-tags-function: #005cc5;
--color-code-tags-constant: #005cc5;
--color-code-tags-property: #005cc5;
--color-code-tags-type: #005cc5;
--color-code-tags-class: #6f42c1;
--color-code-tags-heading: #005cc5;
--color-code-tags-invalid: #cb2431;
--color-code-tags-comment: #6a737d;
--color-json-default: var(--prim-color-secondary-shade-100);
--color-json-null: var(--prim-color-alt-c);
--color-json-boolean: var(--prim-color-alt-a);
Expand All @@ -201,13 +209,16 @@
--color-json-highlight: var(--prim-gray-70);
--color-code-background: var(--prim-gray-0);
--color-code-background-readonly: var(--prim-gray-40);
--color-code-lineHighlight: var(--prim-gray-40);
--color-code-lineHighlight: var(--prim-gray-320-alpha-010);
--color-code-foreground: var(--prim-gray-670);
--color-code-caret: var(--prim-gray-420);
--color-code-selection: var(--prim-gray-120);
--color-code-gutterBackground: var(--prim-gray-0);
--color-code-gutterForeground: var(--prim-gray-320);
--color-code-tags-comment: var(--prim-gray-420);
--color-code-caret: var(--prim-gray-820);
--color-code-selection: #0366d625;
--color-code-selection-highlight: #34d05840;
--color-code-gutter-background: var(--prim-gray-0);
--color-code-gutter-foreground: var(--prim-gray-320);
--color-code-gutter-foreground-active: var(--prim-gray-670);
--color-code-indentation-marker: var(--prim-gray-70);
--color-code-indentation-marker-active: var(--prim-gray-200);
--color-line-break: var(--prim-gray-320);
--color-code-line-break: var(--prim-color-secondary-tint-200);

Expand Down
5 changes: 5 additions & 0 deletions packages/editor-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@codemirror/lang-python": "^6.1.6",
"@codemirror/language": "^6.10.1",
"@codemirror/lint": "^6.8.0",
"@codemirror/search": "^6.5.6",
"@codemirror/state": "^6.4.1",
"@codemirror/view": "^6.26.3",
"@fontsource/open-sans": "^4.5.0",
Expand All @@ -39,6 +40,8 @@
"@n8n/codemirror-lang": "workspace:*",
"@n8n/codemirror-lang-sql": "^1.0.2",
"@n8n/permissions": "workspace:*",
"@replit/codemirror-indentation-markers": "^6.5.3",
"@typescript/vfs": "^1.6.0",
"@sentry/vue": "catalog:frontend",
"@vue-flow/background": "^1.3.2",
"@vue-flow/controls": "^1.1.2",
Expand All @@ -52,6 +55,7 @@
"change-case": "^5.4.4",
"chart.js": "^4.4.0",
"codemirror-lang-html-n8n": "^1.0.0",
"comlink": "^4.4.1",
"dateformat": "^3.0.3",
"email-providers": "^2.0.1",
"esprima-next": "5.8.4",
Expand All @@ -70,6 +74,7 @@
"qrcode.vue": "^3.3.4",
"stream-browserify": "^3.0.0",
"timeago.js": "^4.0.2",
"typescript": "^5.5.2",
"uuid": "catalog:",
"v3-infinite-loading": "^1.2.2",
"vue": "catalog:frontend",
Expand Down
Loading
Loading