-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Summary of the new feature/enhancement
Text Effects (font customization) allow you to place emphasis on text to lower or raise awareness to
the user and improve data comprehension. They include, but not limited to, foreground and background
colors, bold, highlighting, strikethrough, and blinking.
PowerShell should support Text effects in views and interactive sessions for data
comprehension and Accessibility. PowerShell should support, as most modern terminals, 24-bit True
Color. Below are two scenario's for this need:
As a PowerShell user, I want to interactively use Text Effects for reporting and color emphasis. For
example, when a value exceeds defined limits to enhance data comprehension.
As a PowerShell Module builder, I want to take advantage of Text Effects for colorization, and
create views for cmdlets to aid in data comprehension and overall Accessibility.
Proposed technical implementation details (optional)
For PowerShell users, Text Effects can be set in interactive sessions with calculated properties for
the purpose of accenting data with specific defined results. A new attribute texteffect, that is
abbreviated t, follows the previous pattern for alignment (al) and avoids contention.
Get-Service -Name bits | Select-Object -Property Name, @{n='State';e={$_.status};t={...}}For advanced module builders, Text Effects may be added to the formatting system PowerShell
currently has in place. A new xml tag TextEffect will contain a script block.
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>AvailableSpace</Label>
<Width>7</Width>
<Alignment>right</Alignment>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<ScriptBlock>[String]($_.Freespace / 1024)</ScriptBlock>
<TextEffect>if ( $_.Freespace/1024 -lt 100mb ) { "red" }</TextEffect>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>