-
Notifications
You must be signed in to change notification settings - Fork 16
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: restore documentation examples #321
feat: restore documentation examples #321
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate 🙏 🌟
Testing pm2
Works great on mac. Tested making a change in a TS file, the server immediately restarted with change applied 👍
Possible updateDiagram bug?
Not sure when/how I triggered this. Possibly just when adding/moving nodes?
Unfolding bug
Unclear when this bug was introduced. Might be unrelated/out of scope to this PR.
Vscode broken
When creating a new diagram I noticed:
- slightly longer load time (seeing spinner)
- I could not run (no items shown)
- when switching between files seeing this:
packages/ds-ext/src/app/App.tsx
Outdated
|
||
// Send the message to VS Code extension | ||
window.vscode.postMessage(updatedData); | ||
client?.updateDiagram?.(diagram); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the safe(?) operators here? At this time, could/should we enforce a client always to be present?
@@ -5,6 +5,6 @@ export const onUpdateDiagram: MessageHandler = async ({ | |||
event, | |||
document, | |||
}) => { | |||
document.update(new TextEncoder().encode(event.diagram)); | |||
document.update(new TextEncoder().encode(JSON.stringify(event.diagram))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is quite a change, might be related to section "Vscode broken"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I've standardized the data format returned by the various servers (jsServer, socketServer, and vscodeServer). Therefore, we need to recreate the .diagram.json file in ds-ext 😂
@@ -16,7 +16,7 @@ | |||
"test": "yarn run -T vitest", | |||
"build": "tsc", | |||
"release": "yarn run -T release-it", | |||
"watch:server": "nodemon" | |||
"watch:server": "pm2 start ./test-server.ts --watch --no-daemon" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked great 👍
loading: diagramDataLoading, | ||
error: diagramDataError | ||
} = useRequest(async() => { | ||
return client?.getDiagram?.({}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as before, on (?): can we require client always present?
@@ -21,15 +21,69 @@ export class WorkspaceApiClientBase implements WorkspaceApiClient { | |||
|
|||
constructor(private transport: Transport) { | |||
this.initExecutionUpdateHandler(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good shortenings below - keep same pattern here? ie initExecutionUpdates(); ?
this.run = this.run.bind(this); | ||
this.updateDiagram = this.updateDiagram.bind(this); | ||
} | ||
|
||
//<editor-fold desc="Message handler"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seen these a few times - not sure when/how introduced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a bug.
I've resolved the issue, but I found another one : the eventManager is shared on the same page. When I run the |
I see! Yes lets "solve" this for now by only supporting one component per page 👍 |
website playground:
website.mp4
node server playground:
node.mp4
vscode
vscode.mp4