Skip to content

docs: per-tab Settings screenshots + wiki embeds#20

Merged
carterscode merged 2 commits into
mainfrom
docs/screenshots-and-wiki-embeds
May 8, 2026
Merged

docs: per-tab Settings screenshots + wiki embeds#20
carterscode merged 2 commits into
mainfrom
docs/screenshots-and-wiki-embeds

Conversation

@carterscode

Copy link
Copy Markdown
Owner

Summary

Wiki was text-only. Now embeds four screenshots — one per Settings tab — on the Home and Installation pages.

File Subject
docs/screenshots/settings-general.png General tab (theme, startup, change log, polling)
docs/screenshots/settings-global-gaming.png Global gaming tab (Game Mode, HAGS, Memory Integrity, etc.)
docs/screenshots/settings-windows-services.png Windows services tab (preset radio + service cards)
docs/screenshots/settings-display.png Display tab (HDR, refresh, resolution per monitor)
docs/screenshots/settings-window.png Alias for the General tab — preserves the existing README banner reference

tools/capture-screenshots.ps1 extended:

  • Walks the TabControl via UI Automation
  • Calls 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 for README back-compat

Re-runnable any time UI changes — just dotnet build -c Debug then pwsh tools/capture-screenshots.ps1.

How the wiki references work

docs/wiki/Home.md and docs/wiki/Installation.md reference images via raw.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.ps1 to push the updated markdown to the wiki repo.

Path-filter

docs/** and tools/** not in release.yml's path filter — won't trigger a release.

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.
@carterscode carterscode merged commit c631ba1 into main May 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant