caponetto commented on code in PR #2112:
URL:
https://github.com/apache/incubator-kie-tools/pull/2112#discussion_r1448866804
##########
packages/dashbuilder-viewer/dev-webapp/App.tsx:
##########
@@ -39,12 +39,13 @@ pages:
- components:
- html: <h1>Welcome to Dashbuilder!</h1>`;
-const FILE = {
+const FILE: EmbeddedEditorFile = {
fileName: "test.dash.yaml",
fileExtension: "dash.yaml",
getFileContents: function (): Promise<string | undefined> {
return Promise.resolve(TEST_CONTENT);
},
+ normalizedPosixPathRelativeToTheWorkspaceRoot: "",
Review Comment:
```suggestion
normalizedPosixPathRelativeToTheWorkspaceRoot: "test.dash.yaml",
```
Otherwise, we see `No Editor available for 'dash.yaml' extension` when
running the test webapp.
##########
packages/operating-system/src/paths.ts:
##########
@@ -0,0 +1,9 @@
+import * as __path from "path";
Review Comment:
Can we move this file to `vscode-extension` package? I see this is being
used only in there.
Or use `path-browserify` instead of `path`.
My concern is other core packages starting to use this file, which will make
polyfill mandatory for webapps. Sometimes polyfill are not under our control.
##########
packages/dashbuilder-editor/dev-webapp/App.tsx:
##########
@@ -33,12 +33,13 @@ import "./App.scss";
export type ServerlessWorkflowType = "yml" | "yaml";
-const FILE = {
+const FILE: EmbeddedEditorFile = {
fileName: "test.dash.yaml",
fileExtension: "dash.yaml",
getFileContents: function (): Promise<string | undefined> {
return Promise.resolve("");
},
+ normalizedPosixPathRelativeToTheWorkspaceRoot: "",
Review Comment:
```suggestion
normalizedPosixPathRelativeToTheWorkspaceRoot: "test.dash.yaml",
```
Otherwise, we see `No Editor available for 'dash.yaml' extension` when
running the test webapp.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]