[PR #13702] Stop writing optional theme fields #29724

Closed
opened 2026-01-31 09:36:31 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/13702

State: closed
Merged: Yes


Other settings model classes call JsonUtils::SetValueForKey with the
private _##value member as the value. Since _##value is an optional,
this prevented writing out unset, optional fields. The new Themes class
deviated from this and this commit brings it back in line with the others.

Closes #13544

Validation Steps Performed

  • Create a { "name": "test" } theme
  • Save settings via the UI
  • Optional/Defaulted fields aren't written
**Original Pull Request:** https://github.com/microsoft/terminal/pull/13702 **State:** closed **Merged:** Yes --- Other settings model classes call `JsonUtils::SetValueForKey` with the private `_##value` member as the value. Since `_##value` is an optional, this prevented writing out unset, optional fields. The new `Themes` class deviated from this and this commit brings it back in line with the others. Closes #13544 ## Validation Steps Performed * Create a `{ "name": "test" }` theme * Save settings via the UI * Optional/Defaulted fields aren't written ✅
claunia added the pull-request label 2026-01-31 09:36:31 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29724