Skip to content

Commit bedb6c2

Browse files
committed
chore: ✏️ update CHANGELOG and module version to 0.3.0
* Documented the ability to scroll the preview pane and added a warning for rendering issues. * Updated module version in `PesterExplorer.psd1` to 0.3.0. * Adjusted `Get-PreviewPanel` function to improve height calculations and scrolling behavior. * Modified markdown linting configuration for better documentation formatting.
1 parent 78e54d6 commit bedb6c2

File tree

8 files changed

+47
-180
lines changed

8 files changed

+47
-180
lines changed

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## Unreleased
8+
## [0.3.0] 2025-05-29
9+
10+
### Added
11+
12+
- Added the ability to scroll the preview pane on the right.
13+
- A "... more" line will show if you need to scroll.
14+
- This will give a warning if a panel can't completely rendered.
15+
- There is a known issue that you can "scroll past" the last item, but the
16+
last item will still render. You will need to scroll back up an equivalent
17+
number of times. This will be future Gilbert's problem.
18+
19+
### Changed
920

1021
- Move test result breakdown chart to Preview pane.
1122

PesterExplorer/PesterExplorer.psd1

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@
1212
RootModule = 'PesterExplorer.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.2.0'
15+
ModuleVersion = '0.3.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
1919

2020
# ID used to uniquely identify this module
21-
GUID = '1b8311c2-23fd-4a4c-90de-e17cfc306b04'
21+
GUID = '1b8311c2-23fd-4a4c-90de-e17cfc306b04'
2222

2323
# Author of this module
24-
Author = 'Gilbert Sanchez'
24+
Author = 'Gilbert Sanchez'
2525

2626
# Company or vendor of this module
27-
CompanyName = 'HeyItsGilbert'
27+
CompanyName = 'HeyItsGilbert'
2828

2929
# Copyright statement for this module
30-
Copyright = '(c) Gilbert Sanchez. All rights reserved.'
30+
Copyright = '(c) Gilbert Sanchez. All rights reserved.'
3131

3232
# Description of the functionality provided by this module
33-
Description = 'A TUI to explore Pester results.'
33+
Description = 'A TUI to explore Pester results.'
3434

3535
# Minimum version of the PowerShell engine required by this module
3636
PowerShellVersion = '7.0'
@@ -51,13 +51,13 @@
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(
54+
RequiredModules = @(
5555
@{
56-
ModuleName = 'Pester'
56+
ModuleName = 'Pester'
5757
ModuleVersion = '5.0.0'
5858
},
5959
@{
60-
ModuleName = 'PwshSpectreConsole'
60+
ModuleName = 'PwshSpectreConsole'
6161
ModuleVersion = '2.3.0'
6262
}
6363
)
@@ -81,13 +81,13 @@
8181
FunctionsToExport = '*'
8282

8383
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
84-
CmdletsToExport = '*'
84+
CmdletsToExport = '*'
8585

8686
# Variables to export from this module
8787
VariablesToExport = '*'
8888

8989
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
90-
AliasesToExport = '*'
90+
AliasesToExport = '*'
9191

9292
# DSC resources to export from this module
9393
# DscResourcesToExport = @()
@@ -99,12 +99,12 @@
9999
# FileList = @()
100100

101101
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
102-
PrivateData = @{
102+
PrivateData = @{
103103

104104
PSData = @{
105105

106106
# Tags applied to this module. These help with module discovery in online galleries.
107-
Tags = @(
107+
Tags = @(
108108
'Windows',
109109
'Linux',
110110
'macOS',
@@ -116,13 +116,13 @@
116116
)
117117

118118
# A URL to the license for this module.
119-
LicenseUri = 'https://github.com/HeyItsGilbert/PesterExplorer/blob/main/LICENSE'
119+
LicenseUri = 'https://github.com/HeyItsGilbert/PesterExplorer/blob/main/LICENSE'
120120

121121
# A URL to the main website for this project.
122-
ProjectUri = 'https://github.com/HeyItsGilbert/PesterExplorer'
122+
ProjectUri = 'https://github.com/HeyItsGilbert/PesterExplorer'
123123

124124
# A URL to an icon representing this module.
125-
IconUri = 'https://raw.githubusercontent.com/HeyItsGilbert/PesterExplorer/main/images/icon.png'
125+
IconUri = 'https://raw.githubusercontent.com/HeyItsGilbert/PesterExplorer/main/images/icon.png'
126126

127127
# ReleaseNotes of this module
128128
ReleaseNotes = 'https://github.com/HeyItsGilbert/PesterExplorer/blob/main/CHANGELOG.md'

PesterExplorer/PesterExplorer.psm1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#require -Module PwshSpectreConsole
22
# Dot source public/private functions
3-
$classes = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'Classes/*.ps1') -Recurse -ErrorAction Stop)
43
$public = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'Public/*.ps1') -Recurse -ErrorAction Stop)
54
$private = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'Private/*.ps1') -Recurse -ErrorAction Stop)
6-
foreach ($import in @($classes + $public + $private)) {
5+
foreach ($import in @($public + $private)) {
76
try {
87
. $import.FullName
98
} catch {

PesterExplorer/Private/Get-PreviewPanel.ps1

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# spell-checker:ignore Renderable
12
function Get-PreviewPanel {
23
<#
34
.SYNOPSIS
@@ -193,7 +194,7 @@ function Get-PreviewPanel {
193194
Write-Debug "Reducing Preview List: $($results.Count), ScrollPosition: $scrollPosition"
194195

195196
# Determine the height of each item in the results
196-
$totalHeight = 0
197+
$totalHeight = 3
197198
$reducedList = @()
198199
if($ScrollPosition -ne 0) {
199200
# If the scroll position is not zero, add a "back" item
@@ -203,9 +204,17 @@ function Get-PreviewPanel {
203204
$itemHeight = Get-SpectreRenderableSize $results[$i]
204205
$totalHeight += $itemHeight.Height
205206
if ($totalHeight -gt $PreviewHeight) {
207+
if($i -eq $scrollPosition) {
208+
# If the first item already exceeds the height, stop here
209+
Write-Debug "First item exceeds preview height. Stopping."
210+
$reducedList += ":police_car_light:The next item is too large to display! Please resize your terminal.:police_car_light:" |
211+
Format-SpectreAligned -HorizontalAlignment Center -VerticalAlignment Middle |
212+
Format-SpectrePanel -Header ":police_car_light: [red]Warning[/]" -Color 'red' -Border Double
213+
break
214+
}
206215
# If the total height exceeds the preview height, stop adding items
207216
Write-Debug "Total height exceeded preview height. Stopping at item $i."
208-
$reducedList += "[blue]...more. Switch to Panel and scroll with keys.[/]"
217+
$reducedList += "[blue]...more.[/] [grey]Switch to Panel and scroll with keys.[/]"
209218
break
210219
}
211220
$reducedList += $results[$i]

PesterExplorer/Public/Get-PesterTestView.ps1

Lines changed: 0 additions & 79 deletions
This file was deleted.

docs/.markdownlint.jsonc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
22
// These docs are autogenerated and this is the expected format.
3-
"MD025": false
3+
"MD025": false,
4+
"MD022": false,
5+
"MD040": false
46
}

docs/en-US/Get-PesterTestView.md

Lines changed: 0 additions & 75 deletions
This file was deleted.

docs/en-US/Show-PesterResultTree.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ Show-PesterResultTree [[-PesterResult] <Run>] [-ProgressAction <ActionPreference
1717
```
1818

1919
## DESCRIPTION
20-
This function takes a Pester result object and formats it into a tree structure
21-
using Spectre.Console.
22-
It is useful for visualizing the structure of Pester results
23-
such as runs, containers, blocks, and tests.
20+
This function takes a Pester result object and formats it into a tree
21+
structure using Spectre.Console.
22+
It is useful for visualizing the structure
23+
of Pester results such as runs, containers, blocks, and tests.
2424

2525
## EXAMPLES
2626

0 commit comments

Comments
 (0)