Fixes #4928. Update stale config.md deep-dive documentation#4929
Merged
tig merged 4 commits intogui-cs:developfrom Apr 10, 2026
Merged
Fixes #4928. Update stale config.md deep-dive documentation#4929tig merged 4 commits intogui-cs:developfrom
tig merged 4 commits intogui-cs:developfrom
Conversation
- ThemeManager.GetThemes() is private; use ThemeManager.Themes property - SchemeManager.GetCurrentSchemes() does not exist; use GetSchemesForCurrentTheme() - SchemeManager.CollectionChanged is not implemented; remove from docs - ConfigurationManager.UpdateToCurrentValues() is internal; remove from public docs - ConfigurationManager.Serialize() does not exist; replace with GetHardCodedConfig() - GetHardCodedConfig() returns a string (JSON), not an iterable SettingsScope - Example 3: Driver.Force16Colors -> Application.Force16Colors - Example 1: update legacy Application.Init/Run/Shutdown to IApplication pattern - Add missing ConfigurationManager.Updated event to the Events section - Use discard _ for unused lambda parameters (codebase style) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…structure - Revert incorrect pass-1 change: Force16Colors lives on Driver class, not Application; fix all 3 occurrences to use 'Driver.Force16Colors' - Fix Example 1 OptionSelector: OptionSelector<string> does not exist; SetSource() and SelectedItemChanged are deprecated. Use OptionSelector, Labels property, and ValueChanged event with int? index - Expand Scheme structure JSON example with 5 missing roles: Active, HotActive, Highlight, Editable, ReadOnly (all optional, derived from Normal/Focus if not set) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…g.md Document PR gui-cs#4886 functionality in config.md: - Add 'Custom Schemes for Individual Views' section showing View.SchemeName, SchemeManager.AddScheme(), and JSON config definition of custom schemes - Add 'Scheme Resolution Order' section with Mermaid flowchart of the View.GetScheme() fallback chain (HasScheme -> SchemeName -> SuperView -> Base theme -> hard-coded Base) and priority table - Note SchemeManager.TryGetScheme() as the safe consumer API Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the config.md deep-dive documentation so it matches the current ConfigurationManager/theme/scheme APIs, and adds documentation for the scheme fallback + per-view custom scheme functionality introduced in #4886.
Changes:
- Corrects stale/incorrect API references and examples (e.g.,
Driver.Force16Colors,ThemeManager.Themes,SchemeManager.GetSchemesForCurrentTheme(),GetHardCodedConfig()return type). - Adds documentation for per-view custom schemes (
View.SchemeName,SchemeManager.AddScheme) and theView.GetScheme()resolution/fallback order. - Updates event documentation to include
ConfigurationManager.Updated.
- ThemeManager.Themes: use nullable local with null guard instead of non-nullable assignment (null means ConfigurationManager not initialized) - SchemeName description: clarify it uses the named scheme when found, otherwise falls back through SuperView/Base chain (not a strict override) - Example 1 ValueChanged handler: index into themeSelector.Labels instead of calling GetThemeNames() again to avoid ordering mismatch Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4928.
Summary
Updates
docfx/docs/config.mdto match the currentConfigurationManagerAPI and documents new scheme functionality from #4886.Changes
Accuracy fixes (13 issues across 2 commits)
ThemeManager.Themesproperty (wasGetThemes(), which is private)SchemeManager.GetSchemesForCurrentTheme()(wasGetCurrentSchemes(), nonexistent)UpdateToCurrentValues()(internal) andSerialize()(nonexistent) from public API examplesGetHardCodedConfig()example corrected — returnsstring, not iterableIApplicationpatternConfigurationManager.Updatedevent added to Events sectionDriver.Force16Colorscorrected in 3 places (wasApplication.Force16Colors)OptionSelectorupdated —OptionSelector<string>,SetSource(), andSelectedItemChangedare deprecated; useOptionSelector,Labels, andValueChangedActive,HotActive,Highlight,Editable,ReadOnlyNew content (#4886 functionality)
View.SchemeName,SchemeManager.AddScheme(), and JSON config definition of custom schemesView.GetScheme()fallback chain, priority table, and note onTryGetSchemeas the safe consumer API0d9cf20e-14dd-4b08-8d79-f5483142e269