docs: per-tab Settings screenshots + wiki embeds#20
Merged
Conversation
The original script worked in theory but failed three times in a row on Windows PowerShell 5.1 (the default Windows shell). Each fix is a PS-5.1 quirk the script tripped over: * Heredoc parsing: PS 5.1's parser was choking on the @"..."@ block, reporting 'string is missing the terminator'. Replaced with multiple Write-Host calls — same output, no parser drama. * Multi-arg Join-Path: 'Join-Path $a ".." "docs" "wiki"' is a PS 7+ feature. PS 5.1's Join-Path takes exactly two arguments. Replaced with a string-interpolated path 'Resolve-Path "$PSScriptRoot\..\docs\wiki"'. * 2>&1 redirect on git: PS 5.1 wraps every stderr line from a native command in an ErrorRecord, so 'git clone ... 2>&1 | ForEach-Object' threw NativeCommandError on git's normal 'Cloning into ...' message. Removed the redirects; let git print directly. This matches the PowerShell tool guidance in the project's CLAUDE.md. Also, while debugging: * Copy git identity from the parent repo to the wiki clone before committing. The wiki clone is a fresh repo and doesn't inherit the per-repo user.name / user.email set in GamerGuardian/.git/config. Without this the commit silently failed (after the | Out-Null) and the script reported a successful push of zero changes. * Add explicit $LASTEXITCODE checks after add / commit / push so a silent failure surfaces as a thrown exception instead of a 'Done.' message followed by an empty wiki. Verified: ran locally, 12 pages pushed cleanly to https://github.com/carterscode/GamerGuardian/wiki
The wiki was text-only. Adds four screenshots — one per Settings tab — and embeds them on the Home and Installation pages so users get an at-a-glance sense of what the app looks like. Files: * docs/screenshots/settings-general.png — General tab * docs/screenshots/settings-global-gaming.png — Global gaming tab * docs/screenshots/settings-windows-services.png — Windows services tab * docs/screenshots/settings-display.png — Display tab * docs/screenshots/settings-window.png — alias for the General tab; preserved so the existing README banner reference still resolves tools/capture-screenshots.ps1 extended: * Walks the TabControl via UI Automation, calling SelectionItem.Select on each TabItem in turn * PrintWindow's the FluentWindow per tab; saves as settings-<slug>.png * Copies settings-general.png to settings-window.png afterwards for README back-compat Wiki references use raw.githubusercontent.com URLs that resolve to the files in docs/screenshots/ on main. The wiki repo doesn't need to host images — main is the canonical store, the wiki is a rendered mirror.
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.
Summary
Wiki was text-only. Now embeds four screenshots — one per Settings tab — on the Home and Installation pages.
docs/screenshots/settings-general.pngdocs/screenshots/settings-global-gaming.pngdocs/screenshots/settings-windows-services.pngdocs/screenshots/settings-display.pngdocs/screenshots/settings-window.pngtools/capture-screenshots.ps1extended:SelectionItem.Selecton each TabItem in turnsettings-<slug>.pngsettings-general.pngtosettings-window.pngfor README back-compatRe-runnable any time UI changes — just
dotnet build -c Debugthenpwsh tools/capture-screenshots.ps1.How the wiki references work
docs/wiki/Home.mdanddocs/wiki/Installation.mdreference images viaraw.githubusercontent.com/carterscode/GamerGuardian/main/docs/screenshots/<file>.png. The wiki repo doesn't need to host images — main is the canonical store, the wiki renders the markdown which pulls images from raw GitHub.After merge, run
pwsh tools/sync-wiki.ps1to push the updated markdown to the wiki repo.Path-filter
docs/**andtools/**not inrelease.yml's path filter — won't trigger a release.