-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor: openVariablePanels command and split out a PanelController #120
Conversation
End-to-end Test Summary
Detailed Test Results
Failed Test SummaryNo failed tests ✨Flaky Test SummaryNo flaky tests detected. ✨ |
f996b5c
to
a8f5ea9
Compare
a8f5ea9
to
dc6c48b
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.
Overall, looks to be good. Just some comments about TODOs and such
// TODO: The postMessage apis will be needed for auth in DHE (vscode-deephaven/issues/76). | ||
// Leaving this here commented out for reference, but it will need some | ||
// re-working. Namely this seems to subscribe multiple times. Should see | ||
// if can move it inside of the panel creation block or unsubscribe older | ||
// subscriptions whenever we subscribe. | ||
// panel.webview.onDidReceiveMessage(({ data }) => { | ||
// const postMessage = panel.webview.postMessage.bind(panel.webview); | ||
// this.handlePanelMessage(data, postMessage); | ||
// }); | ||
} |
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.
Why isn't this in the creation block above?
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.
I plan to move it as part of the TODO: since it needs some other work anyway.
src/controllers/PanelController.ts
Outdated
// See @deprecated comment in PanelFocusManager.onDidChangeViewState | ||
// Ensure focus is not stolen when panel is loaded | ||
// panel.onDidChangeViewState( | ||
// this.panelFocusManager.handleOnDidChangeViewState(panel) | ||
// ); |
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.
Should this have a TODO or be removed?
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.
Deleted
const changed = [ | ||
...result!.changes.created, | ||
...result!.changes.updated, | ||
] as VariableDefintion[]; |
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.
Would satisfies VariableDefintion[]
work here? Not sure why the casting is necessary.
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.
Unfortunately no. It complains about the mismatch of the branded ids with string ids. I added a comment.
Refactored DhService to be less responsible for UI concerns
openVariablePanels
command. This decouples opening panels from running code. It will also be used by future PR to open panels from existing server variables from the sidebar.PanelController
to make DhService less responsible for UI concerns.