Skip to content

Fixes #4928. Update stale config.md deep-dive documentation#4929

Merged
tig merged 4 commits intogui-cs:developfrom
YourRobotOverlord:docs/update-config-md
Apr 10, 2026
Merged

Fixes #4928. Update stale config.md deep-dive documentation#4929
tig merged 4 commits intogui-cs:developfrom
YourRobotOverlord:docs/update-config-md

Conversation

@YourRobotOverlord
Copy link
Copy Markdown
Collaborator

@YourRobotOverlord YourRobotOverlord commented Apr 10, 2026

Fixes #4928.

Summary

Updates docfx/docs/config.md to match the current ConfigurationManager API and documents new scheme functionality from #4886.

Changes

Accuracy fixes (13 issues across 2 commits)

  • ThemeManager.Themes property (was GetThemes(), which is private)
  • SchemeManager.GetSchemesForCurrentTheme() (was GetCurrentSchemes(), nonexistent)
  • Removed UpdateToCurrentValues() (internal) and Serialize() (nonexistent) from public API examples
  • GetHardCodedConfig() example corrected — returns string, not iterable
  • Example 1 updated to modern IApplication pattern
  • ConfigurationManager.Updated event added to Events section
  • Driver.Force16Colors corrected in 3 places (was Application.Force16Colors)
  • Example 1 OptionSelector updated — OptionSelector<string>, SetSource(), and SelectedItemChanged are deprecated; use OptionSelector, Labels, and ValueChanged
  • Scheme structure JSON expanded with 5 missing roles: Active, HotActive, Highlight, Editable, ReadOnly

New content (#4886 functionality)

  • Custom Schemes for Individual Views — documents View.SchemeName, SchemeManager.AddScheme(), and JSON config definition of custom schemes
  • Scheme Resolution Order — Mermaid flowchart of the View.GetScheme() fallback chain, priority table, and note on TryGetScheme as the safe consumer API

0d9cf20e-14dd-4b08-8d79-f5483142e269

YourRobotOverlord and others added 3 commits April 10, 2026 13:03
- 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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the View.GetScheme() resolution/fallback order.
  • Updates event documentation to include ConfigurationManager.Updated.

Comment thread docfx/docs/config.md
Comment thread docfx/docs/config.md Outdated
Comment thread docfx/docs/config.md
- 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>
@tig tig merged commit 71c2b5f into gui-cs:develop Apr 10, 2026
1 check passed
@YourRobotOverlord YourRobotOverlord deleted the docs/update-config-md branch April 10, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update stale config.md deep-dive documentation

3 participants