Encapsulate the background image settings into a JSON object #1175

Open
opened 2026-01-30 22:18:10 +00:00 by claunia · 2 comments
Owner

Originally created by @carlos-zamora on GitHub (May 16, 2019).

Summary of the new feature/enhancement

As we're adding more settings to the JSON file, do we want to keep what's in each object flat or should we start introducing nested objects? I think having them be nested looks nicer and is easier to read (especially as the settings file gets really big). On the other hand, this might mean that we're forcing settings to look a certain way.

Consider this:

  • Today:
{
    guid: ...,
    useAcrylic: ...,
    colorScheme: ...,
    backgroundImage: ...,
    backgroundImageOpacity: ...,
    backgroundImageStretchMode: ...,
    backgroundImageSetting4: ...,
    backgroundImageSetting5: ...
}
  • Proposal:
{
    guid: ...,
    useAcrylic: ...,
    colorScheme: ...,
    backgroundImage: 
    {
        url: ...,
        opacity: ...,
        stretchMode: ...,
        setting4: ...,
        setting5: ...
    }
}

I think the proposal looks a lot nicer. I'm picking on backgroundImage from #853 but it definitely can apply to some other things like fontProperties (size, family, etc...) and devEnvironment (environmentVariables, startingDirectory, etc...).

Also, I think it's easier to see the benefit when there's a nasty looking settings file as follows:

{
    profileName: ...,
    backgroundImage: ...,
    guid: ...,
    backgroundImageOpacity: ...,
    useAcrylic: ...,
    backgroundImageStretchMode: ...,
    colorScheme: ...
}
Originally created by @carlos-zamora on GitHub (May 16, 2019). # Summary of the new feature/enhancement As we're adding more settings to the JSON file, do we want to keep what's in each object flat or should we start introducing nested objects? I think having them be nested looks nicer and is easier to read (especially as the settings file gets really big). On the other hand, this might mean that we're forcing settings to look a certain way. Consider this: - Today: ``` { guid: ..., useAcrylic: ..., colorScheme: ..., backgroundImage: ..., backgroundImageOpacity: ..., backgroundImageStretchMode: ..., backgroundImageSetting4: ..., backgroundImageSetting5: ... } ``` - Proposal: ``` { guid: ..., useAcrylic: ..., colorScheme: ..., backgroundImage: { url: ..., opacity: ..., stretchMode: ..., setting4: ..., setting5: ... } } ``` I think the proposal looks a lot nicer. I'm picking on backgroundImage from #853 but it definitely can apply to some other things like `fontProperties` (size, family, etc...) and `devEnvironment` (environmentVariables, startingDirectory, etc...). Also, I think it's easier to see the benefit when there's a nasty looking settings file as follows: ``` { profileName: ..., backgroundImage: ..., guid: ..., backgroundImageOpacity: ..., useAcrylic: ..., backgroundImageStretchMode: ..., colorScheme: ... } ```
claunia added the Area-SettingsIssue-TaskProduct-Terminal labels 2026-01-30 22:18:10 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (May 20, 2019):

We'll also need to investigate what it means to provide connection-specific settings -- once there's more than just the ConhostConnection, we'll want configuration options per connection. Does that make this a better or worse idea?

@DHowett-MSFT commented on GitHub (May 20, 2019): We'll also need to investigate what it means to provide connection-specific settings -- once there's more than just the ConhostConnection, we'll want configuration options per connection. Does that make this a better or worse idea?
Author
Owner

@zadjii-msft commented on GitHub (Nov 22, 2021):

I'm gonna repurpose this to "encapsulate the background image settings into a JSON object". We've already got non-flat settings for appearances, and for font properties. So this would be fairly easy to do with the background image as well (if wildly less important now with the SUI).

@zadjii-msft commented on GitHub (Nov 22, 2021): I'm gonna repurpose this to "encapsulate the background image settings into a JSON object". We've already got non-flat settings for appearances, and for font properties. So this would be fairly easy to do with the background image as well (if wildly less important now with the SUI).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1175