-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix saving naming styles options page #34212
Conversation
- Allow page controls to store settings to option store before updating service - Reload page control settings after a cancel or save
@@ -12,9 +12,6 @@ | |||
<TargetLatestRuntimePatch>false</TargetLatestRuntimePatch> | |||
<SelfContained>true</SelfContained> | |||
|
|||
<!-- Do not build again when publishing --> | |||
<NoBuild>true</NoBuild> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unrelated to the fix, but allows for builds in VS to not fail. This same change is already in the master branch.
@jasonmalinowski Could you please take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense as a fix to the problems introduced previously.
Note: This has been tested by the test team and myself. Only one bug was found, which is unrelated and has existed since 15.x. |
var oldOptions = s_optionService.GetOptions(); | ||
var newOptions = s_optionStore.GetOptions(); | ||
s_optionService.SetOptions(newOptions); | ||
OptionLogger.Log(oldOptions, newOptions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As pointed out by David offline, we had been logging option changes on SaveSettings before the earlier PR moved logging into the OptionStore. This reverts the behavior back.
Integration test failure was already logged as #33652 |
Fixes #34210 which was introduced by #33523
The earlier PR didn't account for the Naming option page having very specialized load and save settings. Other option pages were updated to store their changes immediately into the OptionStore but Naming options still relied on SaveSettings being called to directly update the OptionService. In a related way, Naming service overwrites its view model when LoadSettings is called and because of the earlier change LoadSettings was being called every time the page is activated.
Ask Mode template
Customer scenario
User tries to update naming styles for identifiers and changes do not save.
Bugs this fixes
#34210
Workarounds, if any
None
Risk
Low
Performance impact
Low
Is this a regression from a previous update?
Yes, regression was introduced by #33523
Root cause analysis
In Dev16, option saving was rewritten so that all option changes went to a centralized store and were saved to the option service in a single location. This rewrite missed the custom save behavior of the Naming styles option page.
How was the bug found?
Reported through developer feedback