Skip to content

Commit 77dad6f

Browse files
committed
Add a new panel for all OpenShift commands
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent b36b9fb commit 77dad6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+5293
-3239
lines changed

.eslintrc

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
"parserOptions": {
1717
"ecmaVersion": 2018,
1818
"comment": true,
19-
"project": "./tsconfig.json",
19+
"project": [
20+
"./tsconfig.json",
21+
"./src/webview/tsconfig.json"
22+
],
2023
"sourceType": "module"
2124
},
2225
"plugins": [
@@ -106,13 +109,19 @@
106109
},
107110
"overrides": [
108111
{
109-
"files": ["*.test.ts"],
110-
"rules": {
111-
"no-unused-expressions": "off",
112-
"@typescript-eslint/unbound-method" : "off",
113-
"max-nested-callbacks" : "off",
114-
"@typescript-eslint/no-unsafe-assignment": 1
115-
}
112+
"files": ["*.test.ts"],
113+
"rules": {
114+
"no-unused-expressions": "off",
115+
"@typescript-eslint/unbound-method" : "off",
116+
"max-nested-callbacks" : "off",
117+
"@typescript-eslint/no-unsafe-assignment": 1
118+
}
119+
},
120+
{
121+
"files": ["./src/@types/**.d.ts"],
122+
"rules": {
123+
"header/header": "off"
124+
}
116125
}
117126
]
118127
}

.vscode/launch.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@
8888
"-o",
8989
"${workspaceFolder}/test/ui/settings.json",
9090
"-m",
91-
"--mocha_config",
9291
"${workspaceFolder}/test/ui/.mocharc.js",
92+
"-c",
93+
"max",
9394
"-e",
9495
"./test-resources/extensions",
9596
"-i"

build/esbuild-watch.mjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import * as esbuild from 'esbuild';
1010
import { sassPlugin } from 'esbuild-sass-plugin';
1111
import * as fs from 'node:fs/promises';
1212
import process from 'node:process';
13-
import * as cp from 'node:child_process'
13+
import * as cp from 'node:child_process';
14+
import svgr from 'esbuild-plugin-svgr';
1415

1516
// This script runs tsc and esbuild in parallel when there are filesystem changes.
1617
// It outputs predictable markers for the beginning and ending of the compilation,
@@ -46,7 +47,12 @@ await Promise.all(
4647
'.png': 'file',
4748
'.svg': 'file',
4849
},
49-
plugins: [sassPlugin()],
50+
plugins: [
51+
sassPlugin(),
52+
svgr({
53+
plugins: ['@svgr/plugin-jsx']
54+
}),
55+
],
5056
});
5157
contexts.push(ctx);
5258
}),

build/esbuild.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import * as esbuild from 'esbuild';
77
import { sassPlugin } from 'esbuild-sass-plugin';
88
import * as fs from 'fs/promises';
9+
import svgr from 'esbuild-plugin-svgr';
910

1011
const webviews = [
1112
'cluster',
@@ -16,7 +17,8 @@ const webviews = [
1617
'helm-chart',
1718
'log',
1819
'welcome',
19-
'feedback'
20+
'feedback',
21+
'openshift-terminal'
2022
];
2123

2224
function kebabToCamel(text) {
@@ -36,10 +38,12 @@ await Promise.all([
3638
sourcemap: true,
3739
loader: {
3840
'.png': 'file',
39-
'.svg': 'file',
4041
},
4142
plugins: [
4243
sassPlugin(),
44+
svgr({
45+
plugins: ['@svgr/plugin-jsx']
46+
}),
4347
]
4448
})
4549
),

images/helm/helm.svg

Lines changed: 1 addition & 2 deletions
Loading

images/welcome/microsoft.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)