johnpapa/vscode-peacock

restore to defaults issue

PeterScream opened this issue · 10 comments

Versions (please complete the following information):

  • OS: [e.g. mac] win11
  • VS Code version [e.g. 1.37.0-insiders] 1.68.1
  • Peacock Version [e.g. 2.5.2] current

Describe the bug
changed the color
then wanted to go back to defaults, reset and remove options didnt work - color stayed as it was selected
reinstalled extension tried again, set color works but it returns to one of the previously selected colors
Just trying to restore default settings and I'm unable to.
Tried resintalling VS code with extension uninstalled, still the same - help please

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Thank you @PeterScream for creating this issue!

seams like the default color was somehoe overwritten by the extension so every time I select "reset workspace" or "remove all global ..." it comes back to the color I selected 1st time.
And that has been pushed to git so all of my machines now are stuck with custom color, so kinda desperate to bring back the defaults as this is distracting.

Peacock manages the colour via .vscode/settings.json so you should double check that file and maybe remove the colours until it gets back to how you want it.

Might be worth adding that file to .gitignore if you want each computer to be different too.

I had the same issue. My settings.json is empty. Not sure how it happened but Peacock had written the color customizations in my \Code\User\settings.json file (the global one) instead of just a local .settings.json for the folder.

I'm a bit confused. What do y'all mean by you want it to go back to "default settings" ? What are the default settings you refer to? This will help us explore the issue

Regarding the desire for explanation of what the menu options do, the documentation explains those. if you feel it needs further details, please suggest and make a PR to these https://peacockcode.dev

I'm a bit confused. What do y'all mean by you want it to go back to "default settings" ? What are the default settings you refer to? This will help us explore the issue

Regarding the desire for explanation of what the menu options do, the documentation explains those. if you feel it needs further details, please suggest and make a PR to these https://peacockcode.dev

For me default settings are "workbench.colorCustomizations": {} in the AppData\Roaming\Code\User\settings.json.

I thought with Peacock I could have the default colors as a default and for certain folders I could choose to have a different color. Then, when not in that folder I would still have the default (pre Peacock) colors.

However it seems like some actions can cause Peacock to change the global colors in the workbench.colorCustomizations": {} in the AppData\Roaming\Code\User\settings.json which isn't what I personally wanted.

For example:

  1. In one folder, choose a new color with Peacock.
  2. Open a different folder that you didn't color with Peacock.
    Result: The VSCode colors are changed to the Peacock colors you chose before even though the folder did not have the colors in the settings.json and the Peacock colors are also written to the global AppData\Roaming\Code\User\settings.json file.

Is this by design or a bug?

Right now I have to have two "workbench.colorCustomizations": {} fields in my global settings.json because Peacock will mess with the first one causing the default application colors to change for every folder.

"default settings" meaning the color pallet that was used before trying Peacock.

In my situation I only wanted to try the plugin and I never managed to get back my previous settings.
Sadly all those were synced with all of my other machines so, I can't say I'm pleased.
Would really like to restore previous settings or at least set them to default vscode colors, as I found Peacock settings to distracting.

@PeterScream

Would really like to restore previous settings

I hear you. This is not currently a feature. For this to work, thinking out loud, Peacock would need to save the custom workspace colors you may (or may not) have set somewhere. Then restore those with a special command. It would have to be saved somewhere that was persistent, since you could run it a month or year later. It's possible, but has a LOT of implications. An alternative is that we could add something to the docs to state that before using Peacock you could save your colors somewhere else if you have some already set (like a text file). I hear you on this, but I don't think it's something I can accomplish at this time.

or at least set them to default vscode colors

This is what the reset does. It clears the colors that Peacock applied, leaving them in the state that VS Code defaults to, which is no customized colors.

@henrikvilhelmberglund Thanks for the details, I think I follow better now.

For me default settings are "workbench.colorCustomizations": {} in the AppData\Roaming\Code\User\settings.json.

If I hear you correctly, you have SOME color settings already in the user file and none in the workspace file. Peacock adds to the workspace file. So if you have user settings, too, those will apply as long as Peacock has not used the same ones. This is how VS Code applies settings in precedence.

I thought with Peacock I could have the default colors as a default and for certain folders I could choose to have a different color. Then, when not in that folder I would still have the default (pre Peacock) colors.

There are no default colors really. VS Code has whatever you choose for your theme as colors. Then it uses the colorCustomizations from user settings and then from the workspace settings.

However it seems like some actions can cause Peacock to change the global colors in the workbench.colorCustomizations": {} in the AppData\Roaming\Code\User\settings.json which isn't what I personally wanted.

Hmmm. This doesn't sound good. Peacock never touches user settings, or at least it shouldn't.

For example:

  1. In one folder, choose a new color with Peacock.
  2. Open a different folder that you didn't color with Peacock.
    Result: The VSCode colors are changed to the Peacock colors you chose before even though the folder did not have the colors in the settings.json and the Peacock colors are also written to the global AppData\Roaming\Code\User\settings.json file.

I'm not sure I follow entirely here. If you open the one instance of vs code and then switch folders, Peacock only applies itself to one instance of vscode at a time (not folder by folder). If you open vscode instance A on one folder and instance B on another, you could have 2 different Peacock settings if you wanted that.

Is this by design or a bug?

Right now I have to have two "workbench.colorCustomizations": {} fields in my global settings.json because Peacock will mess with the first one causing the default application colors to change for every folder.

If I am not following properly, Perhaps a video of what you are doing would be helpful?

If I am not following properly, Perhaps a video of what you are doing would be helpful?

I made a boring video (no audio): https://www.youtube.com/watch?v=Z7eVxcGthyo hopefully it helps a bit. Basically you need two folders, one with Peacock colors added and one without any colors, then just switch back and forth until it breaks.

I also show the janky workaround you could do if this issue affects you.