-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Describe the change
Overview
Add a configuration setting to control rich UI rendering. This setting should determine how output is rendered by default, based on the environment's support for virtual terminal features.
Details
- Introduce a new module configuration setting (e.g.,
RichUIRendering) that determines whether rich UI rendering is enabled. - The default value should depend on
$Host.UI.SupportsVirtualTerminal. If supported, set$PSStyle.OutputRendering = 'Ansi'; otherwise, set it to'Host'. - Replace all direct usages of
$Host.UI.SupportsVirtualTerminalthroughout the codebase with(Get-GitHubConfig -Name <new setting>)so that UI rendering can be fully controlled via config. - This makes it possible to override the automatic detection for testing or custom scenarios.
- Requirement: Whenever
Set-GitHubConfig -Name 'RichUIRendering' -Value $trueor$falseis called, the function MUST set$PSStyle.OutputRenderingto'Ansi'or'Host'respectively, immediately after updating the config value.
Acceptance Criteria
- New config setting exists and defaults are properly set
- All usages of
$Host.UI.SupportsVirtualTerminalupdated to use config - Whenever
Set-GitHubConfig -Name 'RichUIRendering' -Value ...is called,$PSStyle.OutputRenderingis updated accordingly - Documentation updated to reflect new configuration
- Backwards compatibility maintained for environments without virtual terminal support
Example
In Set-GitHubConfig function
if ($Name -eq 'RichUIRendering') {
if ($Value -eq $true) {
$PSStyle.OutputRendering = 'Ansi'
} else {
$PSStyle.OutputRendering = 'Host'
}
}In the private variable that sets the default config:
RichUIRendering = $Host.UI.SupportsVirtualTerminal
This implementation provides flexible and testable UI rendering configuration for the module.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo