-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Stop writing optional theme fields #13702
Conversation
#define THEME_SETTINGS_TO_JSON(type, name, jsonKey, ...) \ | ||
JsonUtils::SetValueForKey(json, jsonKey, _##name); |
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.
Primary fix. Fixes most fields from appearing (like useMica
).
Theme::Theme() noexcept : | ||
Theme{ winrt::WUX::ElementTheme::Default } | ||
{ | ||
} |
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.
Secondary fix. Prevents window.applicationTheme
from appearing.
Note how this calls the other constructor which sets the _Window
field.
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.
Thanks for digging into this!
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.
thanks for fixing all my bugs 😄
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
Other settings model classes call
JsonUtils::SetValueForKey
with theprivate
_##value
member as the value. Since_##value
is an optional,this prevented writing out unset, optional fields. The new
Themes
classdeviated from this and this commit brings it back in line with the others.
Closes #13544
Validation Steps Performed
{ "name": "test" }
theme