Skip to content

Commit 92c4d3f

Browse files
committed
making progress with the server
1 parent 4eb1690 commit 92c4d3f

19 files changed

Lines changed: 3147 additions & 1 deletion

docs/development.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,9 @@ graph TD
122122
React [React Server] --> |passes on api requests| B
123123
C --> |reads react webpages from| React
124124
```
125+
126+
In development mode, the React app is not embedded into the python server. Instead a separate instance of the React app is run. This allows you to make changes to the UI and see them immediately.
127+
128+
The React App runs on the port 5173. The VSCode extension will automatically open the React app in a new tab.
129+
The python server will run on the port 5174.
130+

vscode/extension/src/web-server/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { isErr, ok, Result } from "../functional/result"
33
import getPort from "../get-port"
44
import { sqlmesh_exec } from "../sqlmesh/sqlmesh"
55
import * as vscode from 'vscode'
6+
import { isProduction } from "../is_dev"
67

78
export interface Server {
89
port: number;
@@ -15,7 +16,7 @@ export const startWebServer = async (outputChannel: vscode.OutputChannel): Promi
1516
if (isErr(sqlmesh)) {
1617
return sqlmesh
1718
}
18-
const port = await getPort()
19+
const port = !isProduction() ? 5174 : await getPort()
1920
const { bin, workspacePath, env } = sqlmesh.value
2021
const process = spawn(bin, ['ui', '--port', port.toString()], {
2122
cwd: workspacePath,
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.react-flow__node {
2+
z-index: 10 !important;
3+
}
4+
.react-flow__handle {
5+
background-color: currentColor;
6+
}
7+
.react-flow__node.react-flow__node-model:hover,
8+
.react-flow__node.react-flow__node-model:active {
9+
z-index: 20 !important;
10+
}
11+
react-flow__attribution {
12+
background: transparent;
13+
}
14+
.lineage__column-source b {
15+
font-weight: 900;
16+
color: var(--color-primary);
17+
}
18+
.react-flow__edge {
19+
pointer-events: none !important;
20+
z-index: -1 !important;
21+
}
22+
.react-flow__background path {
23+
stroke: inherit;
24+
}

0 commit comments

Comments
 (0)