Skip to content

Add support for profiles.defaults in defaults.json #5276

@carlos-zamora

Description

@carlos-zamora

Description of the new feature/enhancement

defaults.json only supports "profiles" as a list, not an object. This means that profiles.defaults cannot be used to present the default values for profiles.

Proposed technical implementation details (optional)

This is a surprisingly large change with very little gain. The CascadiaSettings::LoadAll() function must be rewritten to match the following order:

  1. load defaults/profiles.defaults = A
  2. load defaults/profiles.list = B
    • apply [A] to [B]
    • apply [B] to [B]
  3. load dynamics = C
    • apply [A] to [C]
  4. load user/profiles.defaults = D
    • apply [D] to all existing profiles [B, C]
  5. load user/profiles.list = E
    • apply [A] to [E]
    • apply [D] to [E]
    • apply [E] to [E]

Additionally, dynamic profiles add an additional level of complexity. Each dynamic profile generator relies on DefaultProfileUtils' CreateDefaultProfile. We need to layer defaults/profiles.defaults here. But defaults/profiles.defaults is saved in CascadiaSettings. So we need to find a way to ensure that a construction of a Profile object has defaults/profiles.defaults layers already.

Metadata

Metadata

Assignees

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.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions