[WindowsSettings] DevDocs + JSON schema (#13510)

* #10997 - Added JSON schema and extra shell class

* #13510 - Address feedback and fix wrong typo for a member

* #13510 - Add DevDoc (first version)

* #13510 - make spellcheck happy

* #13510 Address feedback, add scores, replace todos

* Make build server happy

* #13510 - Address feedback - Extra table for keys

* #13510 - Address feedback

* #13510 -Address feedback, add language specified

Co-authored-by: Sekan, Tobias <tobias.sekan@axp-consulting.de>
This commit is contained in:
Tobias Sekan
2021-10-14 16:17:41 +02:00
committed by GitHub
parent db1318fed1
commit da0b96a5ad
9 changed files with 292 additions and 42 deletions

View File

@@ -49,9 +49,9 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings
private bool _disposed;
/// <summary>
/// List that contain all settings.
/// A class that contain all possible windows settings.
/// </summary>
private IEnumerable<WindowsSetting>? _settingsList;
private WindowsSettings? _windowsSettings;
/// <summary>
/// Initializes a new instance of the <see cref="Main"/> class.
@@ -82,11 +82,12 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings
_context.API.ThemeChanged += OnThemeChanged;
UpdateIconPath(_context.API.GetCurrentTheme());
_settingsList = JsonSettingsListHelper.ReadAllPossibleSettings();
_settingsList = UnsupportedSettingsHelper.FilterByBuild(_settingsList);
_windowsSettings = JsonSettingsListHelper.ReadAllPossibleSettings();
TranslationHelper.TranslateAllSettings(_settingsList);
WindowsSettingsPathHelper.GenerateSettingsPathValues(_settingsList);
UnsupportedSettingsHelper.FilterByBuild(_windowsSettings);
TranslationHelper.TranslateAllSettings(_windowsSettings);
WindowsSettingsPathHelper.GenerateSettingsPathValues(_windowsSettings);
}
/// <summary>
@@ -95,13 +96,13 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings
/// <param name="query">The query to filter the list.</param>
/// <returns>A filtered list, can be empty when nothing was found.</returns>
public List<Result> Query(Query query)
{
if (_settingsList is null)
{
if (_windowsSettings?.Settings is null)
{
return new List<Result>(0);
}
var filteredList = _settingsList
var filteredList = _windowsSettings.Settings
.Where(Predicate)
.OrderBy(found => found.Name);