Conversation
…ble with background color parameters Co-authored-by: Copilot <copilot@github.com>
…d maintainability
…sts for consistency
…ter usage in Add-HtmlNodeTable function Co-authored-by: Copilot <copilot@github.com>
…lSubGraph function
…n logic in Add-HtmlTable function
…sing in Add-NodeIcon function
…dling in Add-NodeImage function
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
PSScriptAnalyzer results: Errors: [0], Warnings: [53], Information: [6]
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prepares the AsBuiltReport.Diagram module for the v1.0.7 release by bumping the module version, updating the changelog, and refactoring several private HTML/Graphviz helper functions that generate node, label, table, subgraph, and signature markup.
Changes:
- Bumps the module to v1.0.7 and documents the release in
CHANGELOG.md. - Refactors multiple private HTML helper functions to consolidate font/table parameter handling and improve icon/image processing.
- Updates tests for the signature-table output change and fixes duplicate Pester context names in
AdvancedExample02.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/AdvancedExample02.Tests.ps1 | Renames duplicate test contexts for clearer/unique Pester names. |
| Tests/Add-HtmlSignatureTable.Tests.ps1 | Updates expected HTML output for signature-table background color changes. |
| CHANGELOG.md | Adds the 1.0.7 release notes entry. |
| AsBuiltReport.Diagram/Src/Private/Add-NodeText.ps1 | Refactors font parameter handling and centralizes node formatting call. |
| AsBuiltReport.Diagram/Src/Private/Add-NodeImage.ps1 | Refactors image sizing/table assembly and centralizes node formatting call. |
| AsBuiltReport.Diagram/Src/Private/Add-NodeIcon.ps1 | Refactors icon sizing, additional-info handling, and table generation. |
| AsBuiltReport.Diagram/Src/Private/Add-HtmlTable.ps1 | Refactors row/font handling and subgraph header/icon assembly. |
| AsBuiltReport.Diagram/Src/Private/Add-HtmlSubGraph.ps1 | Adds IconPath support and refactors subgraph icon/label/table construction. |
| AsBuiltReport.Diagram/Src/Private/Add-HtmlSignatureTable.ps1 | Adds table/cell background color parameters and refactors signature-table generation. |
| AsBuiltReport.Diagram/Src/Private/Add-HtmlNodeTable.ps1 | Refactors additional-info handling, font setup, and subgraph header generation. |
| AsBuiltReport.Diagram/Src/Private/Add-HtmlLabel.ps1 | Refactors icon resolution, image sizing, and table-building branches. |
| AsBuiltReport.Diagram/AsBuiltReport.Diagram.psd1 | Updates the module manifest version to 1.0.7. |
| } else { | ||
| $FontBold = $true | ||
| } | ||
| $FontBold = $true |
Comment on lines
+278
to
+282
| [Parameter( | ||
| Mandatory = $false, | ||
| HelpMessage = 'Path to the directory containing icon image files' | ||
| )] | ||
| [string] $IconPath, |
Comment on lines
+315
to
321
| if ($Icon -and $ImageSizePercent -lt 100) { | ||
| if (-not $IconPath) { | ||
| throw 'IconPath is required when ImageSizePercent is less than 100.' | ||
| } | ||
| $ImageSize = Get-ImagePercent -ImageInput (Join-Path -Path $IconPath -Child $Icon) -Percent $ImageSizePercent | ||
|
|
||
| $IconWidth = $ImageSize.Width | ||
| $IconHeight = $ImageSize.Height |
Comment on lines
+225
to
+235
| [Parameter( | ||
| Mandatory = $false, | ||
| HelpMessage = 'Allow to set a table background color' | ||
| )] | ||
| [string] $TableBackgroundColor = '#FFFFFF', | ||
|
|
||
| [Parameter( | ||
| Mandatory = $false, | ||
| HelpMessage = 'Allow to set a cell background color' | ||
| )] | ||
| [string] $CellBackgroundColor = '#FFFFFF', |
Comment on lines
+225
to
+235
| [Parameter( | ||
| Mandatory = $false, | ||
| HelpMessage = 'Allow to set a table background color' | ||
| )] | ||
| [string] $TableBackgroundColor = '#FFFFFF', | ||
|
|
||
| [Parameter( | ||
| Mandatory = $false, | ||
| HelpMessage = 'Allow to set a cell background color' | ||
| )] | ||
| [string] $CellBackgroundColor = '#FFFFFF', |
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.
[1.0.7] - 2026-05-02
🔃 Changed
🔧 Fixed