Skip to content
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

fix(connect): can not select files on the connection form VSCODE-658 #898

Merged
merged 13 commits into from
Dec 10, 2024

Conversation

alenakhineika
Copy link
Contributor

@alenakhineika alenakhineika commented Dec 5, 2024

Description

Electron 32.0 removed support for the path property of the Web File object in favor of the webUtils.getPathForFile method (electron blog). We can not import dialog and webUtils from 'electron' in the sandboxed webview microsoft/vscode#235284. To work around this, we use a custom dialog provider that uses webview APIs to send a message to the extension process to open the electron file dialog and listen for the response to get the file path and send them to the electron file input backend.

Checklist

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@alenakhineika alenakhineika marked this pull request as ready for review December 5, 2024 18:19
src/views/webviewController.ts Outdated Show resolved Hide resolved
src/views/webview-app/overview-page.tsx Outdated Show resolved Hide resolved
src/views/webview-app/overview-page.tsx Outdated Show resolved Hide resolved
src/views/webview-app/overview-page.tsx Outdated Show resolved Hide resolved
src/views/webview-app/overview-page.tsx Outdated Show resolved Hide resolved
src/views/webview-app/vscode-api.ts Outdated Show resolved Hide resolved
src/views/webviewController.ts Outdated Show resolved Hide resolved
src/views/webviewController.ts Outdated Show resolved Hide resolved
src/views/webviewController.ts Show resolved Hide resolved
src/views/webview-app/use-connection-form.ts Outdated Show resolved Hide resolved
src/views/webviewController.ts Outdated Show resolved Hide resolved
src/views/webview-app/overview-page.tsx Outdated Show resolved Hide resolved
@alenakhineika alenakhineika merged commit b19f2e7 into main Dec 10, 2024
6 checks passed
@alenakhineika alenakhineika deleted the VSCODE-658-fix-file-picker-connection-form branch December 10, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants