Skip to content

Encapsulate the background image settings into a JSON object #866

@carlos-zamora

Description

@carlos-zamora

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: ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-SettingsIssues related to settings and customizability, for console or terminalIssue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions