microsoft/Terminal

"Incomplete" color schemes are rejected as if they don't exist (possibly only if in fragment)

Open

#11,457 建立於 2021年10月7日

在 GitHub 查看
 (12 留言) (1 反應) (0 負責人)C++ (3,212 fork)batch import
Area-SettingsHelp WantedIssue-BugPriority-2Product-Terminalgood first issue

倉庫指標

Star
 (35,764 star)
PR 合併指標
 (平均合併 27天 19小時) (30 天內合併 24 個 PR)

描述

Windows Terminal version (or Windows build number)

1.11.2421.0, 1.10.2383.0

Other Software

No response

Steps to reproduce

Use a color scheme that is "incomplete" in a fragment, use the scheme name's in your default profile.

Example:

{
  "schemes": [
    {
      "name": "Test",
      "background": "#000000",
      "foreground": "#000000",
      "black": "#002b36",
      "red": "#6a4d53",
      "green": "#468666",
      "yellow": "#75896c",
      "blue": "#002b36",
      "magenta": "#6a4d53",
      "cyan": "#468666",
      "white": "#75896c",
      "brightBlack": "#002b36",
      "brightRed": "#002b36",
      "brightGreen": "#002b36",
      "brightYellow": "#002b36",
      "brightBlue": "#002b36",
      "brightMagenta": "#002b36",
      "brightCyan": "#002b36",
      "brightWhite": "#002b36"
    }
  ]
}

Drop in %LOCALAPPDATA\Microsoft\Windows Terminal\Fragments\Test\Test.json, and change settings.json's defaults: colorScheme to Test. Launch WT, get greatly misleading warning.

Notice the use of #11456 here. Else, everything seems to be listed as per the documentation on schemes.

Change "Magenta" to "Purple" on both lines, and watch the fragment suddenly be discoverable and work.

Also note: the colors in this scheme are garbage on purpose, if they're ugly, its working.

Expected Behavior

Either working behavior (with the missing colors replaced with Campbell's) and/or a warning specifically telling me what is wrong with the scheme. At no point should WT tell the user that the scheme doesn't exist without any other warnings that specifically state the scheme was found, but is incomplete.

Actual Behavior

On launch with incomplete scheme in fragment, but specified in settings.json

image

Notice the lack of saying the color scheme exists, but misses elements; it just claims it never existed ever, which leads to a day long wild goose chase.

貢獻者指南