Skip to content

Restore original settings after disabling ISE mode #4308

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

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

andyleejordan
Copy link
Member

We were previously setting them to undefined which mostly worked, unless the user had customized the setting. This was most apparent and commonly done with colorTheme. Now we save when we enable, and restore to that value. Note that will only work for the original session, but it does allow the user to test ISE mode out without repercussions.

We could probably save the settings into the global storage context, but that might get hairy!

I don't know if we have an issue for this, but it constantly bothered me when running the tests.

We were previously setting them to `undefined` which mostly worked,
unless the user had customized the setting. This was most apparent and
commonly done with `colorTheme`. Now we save when we enable, and restore
to that value. Note that will only work for the original session, but it
does allow the user to test ISE mode out without repercussions.

We could probably save the settings into the global storage context, but
that might get hairy!
@andyleejordan andyleejordan requested a review from a team December 6, 2022 22:45
@SydneyhSmith SydneyhSmith self-requested a review December 6, 2022 22:51
@andyleejordan andyleejordan enabled auto-merge (squash) December 6, 2022 22:51
@andyleejordan andyleejordan merged commit f97f75c into main Dec 6, 2022
@andyleejordan andyleejordan deleted the andschwa/restore-settings branch December 6, 2022 22:53
@gerneio
Copy link

gerneio commented Dec 15, 2022

@andschwa Not sure why, but just installed the v2022.12.1-preview version and this fix didn't seem to work. Toggling back and forth from ISE mode does NOT retain the colorTheme.

Just to confirm, I did make sure to disable the stable version of the extension and reload after installing the preview extension. I also dug through the .\out\main.js file in the extension folder to make sure that your code change was included for the preview extension, which it was.

@andyleejordan
Copy link
Member Author

Hm, thanks for the report @gerneio. I'll take a second look.

@andyleejordan
Copy link
Member Author

@gerneio I can't repro, this appears to be working as intended for me. I have my theme set to "Solarized Light." I run "Toggle ISE Mode," it applies the ISE theme, and then I run the same command again and it's restoring Solarized Light for me.

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

Successfully merging this pull request may close these issues.

3 participants