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 showOpenDialog fallback #10573

Merged

Conversation

mcgordonite
Copy link
Contributor

@mcgordonite mcgordonite commented Dec 22, 2021

What it does

Fixes #10572 by correcting logic in the plugin extension. The showOpenDialog and other file dialog extension APIs now correctly fall back to the workspace root when the defaultUri is not specified.

How to test

Fallback to the workspace root when a defaultUri is not specified can be tested with the vscode-xml extension as described in #10572.

The behaviour when a defaultUri is present can be tested as described in #7451. In this case, the file dialog should open at the parent folder when a file is passed as the defaultUri.

Review checklist

Reminder for reviewers

The showOpenDialog and other file dialog extension APIs now
correctly fall back to the workspace root when a defaultUri
is not provided.

Signed-off-by: Matthew Gordon <[email protected]>
@colin-grant-work colin-grant-work added bug bugs found in the application file dialog issues related to the file dialog labels Dec 22, 2021
Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm the bug on master and that the fix prevents early fallback to the filesystem root.

@colin-grant-work colin-grant-work merged commit 17b419f into eclipse-theia:master Dec 22, 2021
@mcgordonite mcgordonite deleted the fix-file-dialog-fallback branch December 23, 2021 09:20
mcgordonite added a commit to ARMmbed/theia that referenced this pull request Dec 23, 2021
The showOpenDialog and other file dialog extension APIs now
correctly fall back to the workspace root when a defaultUri
is not provided.

Signed-off-by: Matthew Gordon <[email protected]>
@vince-fugnitto vince-fugnitto added this to the 1.22.0 milestone Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application file dialog issues related to the file dialog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

showOpenDialog fails to fall back to workspace root
3 participants