-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Added files.simpleDialog.currentDirectory option #225565
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
src/vs/workbench/services/dialogs/browser/abstractFileDialogService.ts
Outdated
Show resolved
Hide resolved
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 agree with @bpasero that the setting is unclear. Here's my proposal. There's also the matter of this not working if the path is not a folder path.
src/vs/workbench/services/dialogs/browser/abstractFileDialogService.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/services/dialogs/browser/abstractFileDialogService.ts
Outdated
Show resolved
Hide resolved
6e3efa9
to
53fe387
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.
The setting names do not match now.
Co-authored-by: Alex Ross <alros@microsoft.com>
src/vs/workbench/services/dialogs/browser/abstractFileDialogService.ts
Outdated
Show resolved
Hide resolved
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 made the change to check the setting before doing the stat. This looks good to me now! @bpasero, do you have any further comments?
'parent', | ||
'current' | ||
], | ||
'description': nls.localize('files.dialog.openFolderStartLocation', "Determines whether the file dialog should open in the parent or current folder of the active file."), |
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.
The location is not always the "active file", so this is misleading.
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.
How about this:
Determines the initial location the dialog start in when opening a folder. When set to parent
, the parent folder of the most recently active folder or file will be used. When set to current
the most recently active folder or folder the containing the most recently active file will be used.
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.
Changed to "Determines whether the open folder dialog should start in the parent or current folder of the most recently active file or folder."
@@ -362,6 +362,15 @@ configurationRegistry.registerConfiguration({ | |||
'description': nls.localize('fileDialogDefaultPath', "Default path for file dialogs, overriding user's home path. Only used in the absence of a context-specific path, such as most recently opened file or folder."), | |||
'scope': ConfigurationScope.MACHINE | |||
}, | |||
'files.dialog.openFolderStartLocation': { |
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.
The setting name confuses me a bit. Is it used only when opening a folder or also when picking a location to save? what is a "start location"?
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.
It is just for when doing "open folder". Is files.dialog.openFolderStartPath
clearer? Or maybe files.dialgo.openFolderInitialPath
?
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.
But the setting is not allowing you to set the location, it is allowing to configure if the path
should be used or dirname(path)
.
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 have changed the setting back to a boolean and named it files.dialog.useParentPathForOpenFolder
. Do you prefer that? If not, do you have some suggestions for what it could be instead?
Hi 👋
Closes #210991
This PR adds a new user settings option called
files.simpleDialog.currentDirectory
.2024-08-14.09-34-03.mp4