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

Added files.simpleDialog.currentDirectory option #225565

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

babakfp
Copy link

@babakfp babakfp commented Aug 14, 2024

Hi 👋

Closes #210991

This PR adds a new user settings option called files.simpleDialog.currentDirectory.

2024-08-14.09-34-03.mp4

@babakfp
Copy link
Author

babakfp commented Aug 14, 2024

@microsoft-github-policy-service agree

Copy link
Member

@alexr00 alexr00 left a 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.

@babakfp babakfp force-pushed the simple-dialog-current-directory branch from 6e3efa9 to 53fe387 Compare December 10, 2024 16:52
Copy link
Member

@alexr00 alexr00 left a 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.

alexr00
alexr00 previously approved these changes Dec 17, 2024
Copy link
Member

@alexr00 alexr00 left a 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?

@vs-code-engineering vs-code-engineering bot added this to the January 2025 milestone Dec 17, 2024
chrmarti
chrmarti previously approved these changes Dec 17, 2024
'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."),
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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': {
Copy link
Member

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"?

Copy link
Member

@alexr00 alexr00 Dec 17, 2024

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?

Copy link
Member

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).

Copy link
Member

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?

@alexr00 alexr00 dismissed stale reviews from chrmarti and themself via a82bf25 December 19, 2024 13:40
@alexr00 alexr00 requested a review from bpasero December 19, 2024 13:43
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.

Add a setting for changing the default path for "Open Folder" to be current open folder, not parent dir
4 participants