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

Can you provide the ability to select the root path of all workspaces? #105

Open
mofazhe opened this issue Mar 28, 2024 · 2 comments
Open

Comments

@mofazhe
Copy link
Contributor

mofazhe commented Mar 28, 2024

I want to put all workspaces in one directory for synchronization, and when I modify the name of the workspace, the program can automatically rename the name of the corresponding directory.

For the current program, I have to select a folder for each workspace. When I modify the name of the workspace, I need to manually rename the corresponding folder, which is not very convenient.

I think a new option that can be added to the settings first is to set the global root directory of the workspace.
Then add a new type to the workspace type to automatically use the set global root directory, or in the global settings, you can switch whether to use the global root directory or manually set it when using the file system.

@flawiddsouza
Copy link
Owner

When I modify the name of the workspace, I need to manually rename the corresponding folder, which is not very convenient.

This is because the name of the workspace is independent from the name of the folder containing the workspace. The name of the workspace is stored at the root of the folder in the restfox.json file. This is so you can have a folder with any name you want while having the actual workspace name be something different or longer.

But I understand the feature you're looking for. You set a folder path, which assuming contains lots of workspaces. You want Restfox to automatically open those folders on load and keep them in sync. This is possible to do.

This would still not change the fact that changing the workspace name will not change the folder name in the parent folder containing all the workspaces. This could be accomplished by providing a checkbox while updating a workspace, to also rename workspace folder to be the same as the workspace name.

Any suggestions?

@mofazhe
Copy link
Contributor Author

mofazhe commented Mar 29, 2024

This would still not change the fact that changing the workspace name will not change the folder name in the parent folder containing all the workspaces. This could be accomplished by providing a checkbox while updating a workspace, to also rename workspace folder to be the same as the workspace name.

I think this option should use the folder name as the name of the workspace. It will always be displayed on the properties interface of the workspace and its value will be saved in restfox.json. If possible, add a tooltip after it to remind the user that there are some limitations on using the folder name.

For the created workspace, when checked, the name of the folder should be used as the name of the workspace. When unchecked, the name in restfox.json should be used as the name of the workspace. Switching selections should not affect the folder name or the name in restfox.json, only the displayed workspace name. When the option is checked, when the user modifies the name of the workspace, the name of the corresponding folder and the name in restfox.json should be modified simultaneously (personally, I think it may be reasonable to change the name in restfox.json at the same time mainly for the purpose of using the same name when the user unchecks this option). Also, when the entered name is illegal, you need to be prompted to refuse the modification. When unchecked, users who modify the name of the workspace should only modify the name in restfox.json.
For when the workspace is being created and the selected folder is empty: when checked, the name at this time should be prohibited from being modified and the name of the folder should be displayed. When not checked, the name of the workspace can be modified freely. When the user completes the settings and clicks "Create", the name of the workspace should be written to restfox.json regardless of whether it is checked or not.
When a workspace is being created and the selected folder contains workspace content: the settings in restfox.json should be read and the corresponding items should be filled in automatically. When checked, the name of the workspace displays the folder name, which is not allowed to be modified at this time. The content in the edit box should be cached in memory. When unchecked, the name of the workspace displays the value cached in memory (if any) or the settings in restfox.json, and allows modification. When the end user clicks "Create", the corresponding value in restfox.json should be overwritten.

This option might look like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants