-
Notifications
You must be signed in to change notification settings - Fork 2
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
Create Requirements webview component #1498
Conversation
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 was getting some errors when messing around with this without a Python section. I think we need to be more robust and considered with our Python Packages section (not just the webview one, but generally).
extensions/vscode/webviews/homeView/src/components/views/PythonPackages.vue
Outdated
Show resolved
Hide resolved
extensions/vscode/webviews/homeView/src/components/views/PythonPackages.vue
Outdated
Show resolved
Hide resolved
extensions/vscode/webviews/homeView/src/components/views/PythonPackages.vue
Show resolved
Hide resolved
…-python-package-webviewview
I've reworked the code around this and believe I've addressed your concerns. |
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.
Caught some bits that have some odd typing, a if statement that looked a bit odd, and a larger question about how to handle a consistent error on configuration save.
Marking as approved since everything is minor besides the error, and the error can be a follow-up. We can discuss tomorrow morning how to deal with the error.
const currentConfig = this.getConfigByName(activeConfiguration); | ||
const pythonSection = currentConfig?.configuration.python; | ||
if (!pythonSection) { | ||
pythonProject = false; | ||
} else { |
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.
Okay this is very odd. I'm getting an 500 error on the API call below this every time I have a Python section, comment it out, then save.
However throwing a breakpoint in I get 3 calls to _onRefreshPythonPackages()
. The first two have the old data, and the final one has the correct data.
I tried opening the file in vim
and making a change and I got 6 calls. Opening in nano
got me back to 3 calls on save.
I'm unsure how exactly to handle this. It feels like we should only have one event, perhaps we need to audit how the "activeConfigChanged"
even is getting triggered and ensure that we aren't getting multiple from a single change.
Since this works, but just throws a notification at the user I'd be comfortable looking at this as a follow-up that we address soon-ish.
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.
Created #1509
|
||
const fileUri = Uri.joinPath(this.root.uri, relPathPackageFile); | ||
|
||
if (await fileExists(fileUri)) { |
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.
Really like this usage here. I forgot we have access to that.
Intent
Resolves #1343
Resolves #1345
This PR implements a Python package section within the webViewView as a contextual section to the EasyDeploy.
Type of Change
Approach
Appropriately replicated functionality from old requirements.ts view, but now operating within the confines of our WebViewView Vue app.
All expected behavior should work:
Automated Tests
Directions for Reviewers
Checklist