-
Notifications
You must be signed in to change notification settings - Fork 38
Feature/dove graph #422
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
base: main
Are you sure you want to change the base?
Feature/dove graph #422
Conversation
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
37e9b2a
to
eb0d8ea
Compare
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.
The UX is looking really good, but there are some things in the code we'll need to cleanup before merge.
context
We don't typically want to store the extension context as a global, and we usually want to pass it all the way down where possible. The route I would take is to start by deleing the contextProvider.ts
file and seeing how you can mangle it down there.
build files (media
)
We add a new dependency in this PR - cytoscape - but, we should not be checking in this file into our git repository. Instead, at build time, we should be pulling it from the installed node_modules.
The remaining files make sense, since it's written outside of a package and is part of the extension.
console.log(`Congratulations, your extension "vscode-db2i" is now active!`); | ||
|
||
loadBase(context); | ||
ContextProvider.setContext(context); |
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.
So typically in extension, we don't store the context globally. We always pass the instance down in the activate
function. For example, you might pass it down to resultsProvider.initialise
and do the work there.
} | ||
|
||
private getUri(path: string[], webview: vscode.Webview): vscode.Uri { | ||
const context = ContextProvider.getContext(); |
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.
again, shouldn't be using this context provider. Instead, the context could be stored as a private member property passed in from the constructor.
Introduce a new CytoscapeGraph class to manage graph elements and display them in a webview. Enable node selection to show detailed information.
Tasks:
https://github.com/codefori/vscode-db2i/blob/main/src/views/results/explain/doveTreeDecorationProvider.ts#L38
Here are the attached icons for each different node type: https://github.com/codefori/vscode-db2i/blob/main/src/views/results/explain/doveResultsView.ts#L13
Perhaps you need this to embed the icons into the webview? https://github.com/microsoft/vscode-codicons
Old logic here: https://github.com/codefori/vscode-db2i/blob/main/src/views/results/explain/doveResultsView.ts#L126
Screen.Recording.2025-07-17.at.1.51.15.PM.mov