-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deduplicate identical inbox color schemes to heal user settings (#12800)
Up until now, we have treated inbox, fragment and user color schemes the same: we load them all into one big map and when we save the settings file we write them *all* out. It's been a big annoyance pretty much forever. In addition to cluttering the user's settings file, it prevents us from making changes to the stock color schemes (like to change the cursor color, or to adjust the colors in Tango Dark, or what have you) because they're already copied in full in the user settings. It also means that we need some special UI affordances for color schemes that you are allowed to view but not to delete or rename. We also have a funny hardcoded list of color scheme names and we use that to determine whether they're "inbox" for UI purposes. Because of all that, we are hesitant to add *more* color schemes to the default set. This pull request resolves all of those issues at once. It: - Adds an "origin" to color schemes indicating where they're from (Inbox, Fragment, User, ...) - Replaces the Edit UI with a much simpler version that pretty much only has a "duplicate this color scheme to start editing it" button - Deletes color schemes that we consider to be equivalent to inbox ones; this allows us to finally disentangle the user's preferences from the terminal's. - Migrates all user settings that referred to schemes they may have modified (even implicitly!) to their modified versions. The equivalence check intentionally leaves out the cursor and selection colors, so that we have the freedom to change them in the future. The Origin is part of a new interface, `ISettingsModelObject`, which we can use in the future for things like Themes and Actions.
- Loading branch information
Showing
23 changed files
with
1,235 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,8 @@ ptys | |
pwshw | ||
qof | ||
qps | ||
Remappings | ||
Retargets | ||
rclt | ||
reimplementation | ||
reserialization | ||
|
708 changes: 683 additions & 25 deletions
708
src/cascadia/LocalTests_SettingsModel/ColorSchemeTests.cpp
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.