-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
[Settings UI] Add a button to reset the settings to defaults #947
Comments
Out of curiosity, do you know which PR introduced a breaking change for the settings? The only two I can think of would be the color names one and the keybindings one. The first left the legacy de-serialization code, so the color tables would be gracefully updated. The latter had a conditional that included checking to see if no keybindings were found, and generating the defaults in that case. |
(accidental closure; please disregard) |
That was a misinterpreted example, I know that there have not been any breaking changes during the last days. I was thinking that in the future with the full implementation of features like icons and multiple WSL distros the configuration format and/or parameter names might change. Plus, this feature is also useful for when the user changes the values and want to reset them to default. |
I think the long-term intention here is to have a cascading settings model, where there's a static "default settings" file, and the user's settings are in a separate file, which is applied on top of the defaults. In that scenario, the "reset to defaults" flow would just be deleting everything in your user settings. This work is being tracked in #754. Additionally, there's other work being done to add an actual settings dialog, which will allow for changing the settings without needing to edit the file directly. This seems like a great request for that UI :) |
I think https://github.com/microsoft/vscode would be the best place to look to. The Settings UI there is great and having a similar one (maybe little more simplistic) for the Terminal would be great. Honestly with all the json going on in the backend with Terminal, I'm curious just how much of what VSCode has can be directly ported. |
On account of the Terminal is not written in javascript or running in electron but that VSCode is, none of it. 😄 |
Well I knew the bulk of the code there wouldn't be useful due to those reasons but thought the json files may be of use. I took a look at the core files in https://github.com/microsoft/vscode/blob/master/.vscode/ and have to agree they can't be used as is but they do provide a good example for anyone interested in improvements in this repo. I did just try to look for the UI component for settings and nothing stands out immediately. If it's written in JS/TS then may not be useful though not sure if it's possible to convert to C ++ (don't really mess with the C family much, much prefer python). |
I would personally favor a menu item below "settings" and above "Feedback" to reset settings to default, especially while we're in preview releases. I'm not concerned about breaking changes, and I know how to just delete profiles.json, but the workflow is inconvenient, and removing it seems to be the only way to get Terminal to recognize a new WSL distro unless i want to built a profile for that myself, which isn't a super exciting prospect for me. It also allows Terminal to put new settings in the file like 'copyOnSelect' in the correct place so i can be lazy and just swap that from false to true without having to guess where i should place that in the file. |
Has there anything changed with the latest release? The "cascading settings" issue #754 is closed now. Can I just delete the settings file to reset to default? |
Boy oh boy that comment seems like so long ago. That was written before we even had a good picture of what cascading settings would be like. @gulshan you could always have done that and had the terminal re-generate a settings file for you. Now when it re-generates the file, it will be much simpler. The "add a button to delete the settings" work still needs to be done. |
So is this up for grabs and if so, what would the ideal way be to implement this? Should a "Delete Settings file" button be placed under or next to the "Open JSON File" button? |
Summary of the new feature/enhancement
Sometimes, I update between builds and see breaking changes on the configuration side. I know that this is normal on Alpha software but there should be a way to remove the configuration without having to delete profiles.json manually.
This can also be helpful for end users once the Terminal is released.
Proposed technical implementation details (optional)
This can work like the normal Shift + Right Click on the Windows Explorer: A Shift + Left Click on the selector should show more options like the already mentioned Delete/Reset Configuration.
The text was updated successfully, but these errors were encountered: