-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Default profiles appear even if removed from the config.json #8270
Comments
@dev-kittens - to "remove" auto-generated profile you need to mark it as You can find more details and explanations about this here: https://docs.microsoft.com/en-us/windows/terminal/dynamic-profiles |
@Don-Vito Thank you for the link. I've added the unwanted profiles to I'm not satisfied with this answer, though. It's quite unintuitive to have profiles appear even though they were deleted in the configuration file. |
@dev-kittens - I am not from the team, but what you write makes sense, the behavior is not the most intuitive. Probably you should update the issue title and expected behavior. So once the team gets to it, they know that you are aware of current behavior but ask for an improvement. |
Oh, sure. I've just done that. |
Thanks for the feedback! We actually went throguh a pretty lengthy design discussion about this last year when we were implementing cascading settings and dynamic profiles the first time. If you really want to read more of our decision making process, you can refer to #1258 and #1321. While this wasn't the most intuitive feature I've ever shipped, this behavior had the least drawbacks. I've added some additional docs over at MicrosoftDocs/terminal#186, hopefully that should help mitigate the confusion a bit. |
So, in order to stop seeing a shell for something I don't have and don't use yet (Azure) I needed to add |
@Don-Vito / @zadjii-msft - I'm just another Windows Terminal user here, but here are a few thoughts:
Also, I ran into the same issue as @spiralw where I deleted the profile from the config file and found it odd that the deleted profile was restored in the UI but wasn't in the config file. The suggested solution of Windows Terminal re-adding the items to the JSON file on start seems reasonable to eliminate this confusion. |
(1 A) IIRC, the "delete profile" button on a profile in the SUI should hide dynamic profiles, instead of just removing them from the json. @carlos-zamora can correct me if I'm wrong on that. If it doesn't today, the works that's being done as a follow up to #10513, #8324 should take care of this (1 B) RE:
I thought we were going to be adding that text to the SUI at some point, but clearly we forgot to do that.
That's definitely unexpected. When the settings UI loads up the settings, it actually just uses the contents of the file, so perhaps it's possible that your editor had the file open and didn't notice that the file contents changed out from underneath it? |
The problems in this case are: b. Hiding the profile doesn't remove it from the Settings menu. If I delete a profile I expect it to act like it's fully deleted - at least in the UI.
Thanks for getting an issue opened for this!
This definitely repros:
|
In box and dynamic profiles disable the delete button and display a text explaining why it's disabled: We still show hidden profiles in the SUI so hiding it won't fix the issue. We need #8324 so that we can know when the user deleted (via JSON or SUI) the profile and we make sure it doesn't show up again. Not great but we're getting there. @DaveEM You're seeing the same bug here. The Windows PowerShell profile should basically be an empty profile IIRC. The problem shouldn't repro for non-dynamic non-in-box profiles (brand new profiles you created yourself). |
@zadjii-msft removing the Resolution-By-Design tag since we'll want to do this after #8324. |
Let's say a user doesn't know that they need to write `"hidden": true` in order to prevent a profile from showing up (and a settings UI doesn't exist). Naturally they would open settings.json and try to remove the profile object. This section of code recognizes if a profile was seen before and marks it as `"hidden": true` by default and thus ensures the behavior the user expects: Profiles won't show up again after they've been removed from settings.json. ## References #8324 - Application State ## PR Checklist * [x] Closes #8270 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * settings.json/state.json are created if they don't exist ✔️ * Removing any profile from settings.json doesn't cause it to appear again ✔️ * Hitting save in SUI creates profiles with `"hidden": true` ✔️ * Removing a default profile and hitting save in SUI works ❌ An empty object is added instead.
Let's say a user doesn't know that they need to write `"hidden": true` in order to prevent a profile from showing up (and a settings UI doesn't exist). Naturally they would open settings.json and try to remove the profile object. This section of code recognizes if a profile was seen before and marks it as `"hidden": true` by default and thus ensures the behavior the user expects: Profiles won't show up again after they've been removed from settings.json. ## References #8324 - Application State ## PR Checklist * [x] Closes #8270 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * settings.json/state.json are created if they don't exist ✔️ * Removing any profile from settings.json doesn't cause it to appear again ✔️ * Hitting save in SUI creates profiles with `"hidden": true` ✔️ * Removing a default profile and hitting save in SUI works ❌ An empty object is added instead.
🎉This issue was addressed in #10910, which has now been successfully released as Handy links: |
Description of the new feature/enhancement
When one of the default profiles (PowerShell, Command Prompt, Azure Cloud Shell) is deleted from the configuration file, it still appears in the Terminal. As it is not in the configuration file, it can no longer be edited.
It would be more intuitive if the profiles are either re-created in the config file, or they disappear from the new session dropdown in the terminal.
If they were to be removed from the terminal, it would make sense if a dynamic profile was added to the configuration file when a new shell is installed, so that the user would be able to configure or delete it.
The text was updated successfully, but these errors were encountered: