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

Use remote file dialog for database and server properties dialogs #24390

Merged
merged 16 commits into from
Sep 13, 2023

Conversation

corivera
Copy link
Member

Currently we only use the local file system dialog for some of the database and server properties path & file fields, but many SQL instances are on other machines. This change adds the same remote file dialog used for Attach and Restore to the properties dialogs.

As part of this work I had to add a flag to the file browser to be able to only show folders, since some of the properties fields are only folders, like the default database file location for example. Anytime the file browser is opened in folder-only mode the file filters box gets hidden and the other controls expand to fill the space.

With file filter:
DialogWithFilter

Without file filter:
DialogWithoutFilter

I also added a small fix for handling undefined values in the Attach Database dialog that I was hitting during some testing.

Currently waiting on the related changes in STS and the dataprotocol-client to be checked in before merging this.
microsoft/sqlops-dataprotocolclient#95
microsoft/sqltoolsservice#2238

@corivera
Copy link
Member Author

Related issues:
#24318
#24313

I'll leave those open until the release branch ports are taken care of.

src/sql/azdata.d.ts Outdated Show resolved Hide resolved
}

export interface FileBrowserProvider extends DataProvider {
openFileBrowser(ownerUri: string, expandPath: string, fileFilters: string[], changeFilter: boolean, showFoldersOnly?: boolean): Thenable<boolean>;
Copy link
Contributor

Choose a reason for hiding this comment

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

If you could add a doc comment for this (and then copy it over minus the new param to azdata.d.ts) that would be fantastic 😄

Copy link
Contributor

@Charles-Gagnon Charles-Gagnon left a comment

Choose a reason for hiding this comment

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

Looks good once the STS & protocol changes are brought in

@corivera corivera marked this pull request as ready for review September 13, 2023 00:08
@corivera corivera merged commit 08ded51 into main Sep 13, 2023
@corivera corivera deleted the corivera/showFolders branch September 13, 2023 17:49
kisantia pushed a commit that referenced this pull request Sep 13, 2023
…4390) (#24412)

* Use remote file dialog for database and server properties dialogs (#24390)

* Bump STS version
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.

3 participants