Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e9f1d34
Initial plan
Copilot May 20, 2026
002a389
Add figures generation system with number-lines, call-stack, closure-…
Copilot May 20, 2026
e8180b8
Fix XML doc comment syntax in Figures.cs
Copilot May 20, 2026
e288877
Add figures documentation and for-loop walkthrough figure
Copilot May 20, 2026
a7d1871
Fix code review: comment style in Canvas.cs, caret→dot in docs, fix h…
Copilot May 20, 2026
6589ae7
Add struct-fields figure, page screenshot, and second worked example …
Copilot May 21, 2026
485c800
Add 4 more figures: if-else, maps, slices, pointers
Copilot May 21, 2026
b00ffe7
Add 4 more figures: arrays, switch, functions, multiple-return-values
Copilot May 21, 2026
8c80aa0
Add docs/figure-plan.md tracking figure progress for all 84 examples
Copilot May 21, 2026
998e413
Add 16 suggested-batch figures and mark done in figure-plan.md
Copilot May 21, 2026
97307be
Implement next suggested figure batch (16 examples)
Copilot May 21, 2026
6fa0103
Implement next 16 suggested figures (batch 3)
Copilot May 21, 2026
85fef10
Implement final 22 figure diagrams and complete plan
Copilot May 21, 2026
f055292
Add screenshots for all 84 figure pages and update figures.md reference
Copilot May 21, 2026
f1c7fa8
docs: review figures and update docs/figures.md for accuracy
Copilot May 26, 2026
a3b6315
Implement async generation, tab safety, and CI split
Copilot Jul 6, 2026
ea0f908
Address validation feedback and finalize accessibility and workflow u…
Copilot Jul 6, 2026
4117ba5
Merge pull request #45 from AlexHedley/copilot/review-app-and-suggest…
AlexHedley Sep 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build / Deploy to GH Pages
name: Build / Validate

on:
workflow_dispatch:
Expand Down Expand Up @@ -32,9 +32,3 @@ jobs:

- name: 🏗️ Generate Site
run: dotnet run --property:Configuration=Release --project src/dotnetbyexample/dotnetbyexample.csproj

- name: 🚀 Deploy Code Coverage Report
uses: JamesIves/github-pages-deploy-action@v4.8.0
with:
branch: gh-pages
folder: site
42 changes: 42 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy GH Pages

on:
workflow_dispatch:
push:
branches: [ main, dev ]
paths:
- src/**
- examples/**

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: 🛎️ Checkout
uses: actions/checkout@v6

- name: ⚙️ Setup .NET 10.0
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'

- name: ⬇️ Restore dependencies
run: dotnet restore
working-directory: src

- name: 🔨 Build
run: dotnet build --configuration Release --no-restore
working-directory: src

- name: 🏗️ Generate Site
run: dotnet run --property:Configuration=Release --project src/dotnetbyexample/dotnetbyexample.csproj

- name: 🚀 Deploy Site
uses: JamesIves/github-pages-deploy-action@v4.8.0
with:
branch: gh-pages
folder: site
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Locally
## docs

- 📂[docs](docs/README.md)
- 📄[figures](docs/figures.md) — how to add inline SVG diagrams to example pages

## Dependencies

Expand Down
Binary file added docs/figure-arrays.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-atomic-counters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-base64-encoding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-channel-buffering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-channel-directions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-channel-synchronization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-channels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-closing-channels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-closures.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-command-line-arguments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-command-line-flags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-command-line-subcommands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-constants.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-context.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-custom-errors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-defer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-directories.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-embed-directive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-enums.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-environment-variables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-epoch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-errors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-execing-processes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-exit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-file-paths.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure-for.png
Binary file added docs/figure-functions.png
Binary file added docs/figure-generics.png
Binary file added docs/figure-goroutines.png
Binary file added docs/figure-hello-world.png
Binary file added docs/figure-http-client.png
Binary file added docs/figure-http-server.png
Binary file added docs/figure-if-else.png
Binary file added docs/figure-interfaces.png
Binary file added docs/figure-json.png
Binary file added docs/figure-line-filters.png
Binary file added docs/figure-logging.png
Binary file added docs/figure-maps.png
Binary file added docs/figure-methods.png
Binary file added docs/figure-multiple-return-values.png
Binary file added docs/figure-mutexes.png
Binary file added docs/figure-non-blocking-channel-operations.png
Binary file added docs/figure-number-parsing.png
Binary file added docs/figure-panic.png
108 changes: 108 additions & 0 deletions docs/figure-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Figure Plan

Tracks which example pages have a visual figure banner and which still need one.

A figure is added by:

1. Writing a paint method in `src/dotnetbyexample/Marginalia/Figures.cs`.
2. Registering it in `Figures.Registry` (same file).
3. Adding an entry to `FigureAttachments.Attachments` in `src/dotnetbyexample/Marginalia/FigureAttachments.cs`.

---

## Progress

84 of 84 examples have figures (0 remaining).

| Example | Figure | Status |
|---|---|---|
| `arrays` | `array-index` | ✅ done |
| `atomic-counters` | `atomic-counter-sync` | ✅ done |
| `base64-encoding` | `base64-roundtrip` | ✅ done |
| `channel-buffering` | `channel-buffering-cap` | ✅ done |
| `channel-directions` | `channel-directions` | ✅ done |
| `channel-synchronization` | `channel-sync` | ✅ done |
| `channels` | `channel-buffer` | ✅ done |
| `closing-channels` | `channel-close-range` | ✅ done |
| `closures` | `closure-cell` | ✅ done |
| `command-line-arguments` | `cli-args-slice` | ✅ done |
| `command-line-flags` | `cli-flags-parse` | ✅ done |
| `command-line-subcommands` | `cli-subcommands` | ✅ done |
| `constants` | `const-value` | ✅ done |
| `context` | `context-cancel-tree` | ✅ done |
| `custom-errors` | `custom-error-fields` | ✅ done |
| `defer` | `lifo-defer` | ✅ done |
| `directories` | `directory-tree` | ✅ done |
| `embed-directive` | `embed-directive` | ✅ done |
| `enums` | `enum-values` | ✅ done |
| `environment-variables` | `env-key-values` | ✅ done |
| `epoch` | `epoch-offset` | ✅ done |
| `errors` | `exception-flow` | ✅ done |
| `execing-processes` | `exec-process` | ✅ done |
| `exit` | `exit-status` | ✅ done |
| `file-paths` | `file-path-parts` | ✅ done |
| `for` | `for-loop` | ✅ done |
| `functions` | `function-call` | ✅ done |
| `generics` | `generic-box` | ✅ done |
| `goroutines` | `goroutine-lanes` | ✅ done |
| `hello-world` | `console-writeline` | ✅ done |
| `http-client` | `http-client-roundtrip` | ✅ done |
| `http-server` | `http-server-listener` | ✅ done |
| `if-else` | `if-else-branch` | ✅ done |
| `interfaces` | `interface-contract` | ✅ done |
| `json` | `json-serialize` | ✅ done |
| `line-filters` | `line-filter` | ✅ done |
| `logging` | `structured-log-entry` | ✅ done |
| `maps` | `map-entries` | ✅ done |
| `methods` | `method-slots` | ✅ done |
| `multiple-return-values` | `multi-return` | ✅ done |
| `mutexes` | `mutex-critical` | ✅ done |
| `non-blocking-channel-operations` | `non-blocking-select` | ✅ done |
| `number-parsing` | `number-parse-flow` | ✅ done |
| `panic` | `panic-recover-stack` | ✅ done |
| `pointers` | `ref-alias` | ✅ done |
| `random-numbers` | `random-numbers` | ✅ done |
| `range-over-built-in-types` | `range-runes` | ✅ done |
| `range-over-channels` | `range-over-channels` | ✅ done |
| `range-over-iterators` | `range-iterator` | ✅ done |
| `rate-limiting` | `rate-limiter` | ✅ done |
| `reading-files` | `read-file-buffer` | ✅ done |
| `recover` | `recover-flow` | ✅ done |
| `recursion` | `call-stack` | ✅ done |
| `regular-expressions` | `regex-captures` | ✅ done |
| `select` | `select-race` | ✅ done |
| `sha256-hashes` | `sha256-digest` | ✅ done |
| `signals` | `signal-channel` | ✅ done |
| `slices` | `slice-window` | ✅ done |
| `sorting` | `sort-before-after` | ✅ done |
| `sorting-by-functions` | `sort-comparator` | ✅ done |
| `spawning-processes` | `spawn-process-pipe` | ✅ done |
| `stateful-goroutines` | `stateful-owner` | ✅ done |
| `string-formatting` | `format-placeholders` | ✅ done |
| `string-functions` | `string-ops` | ✅ done |
| `strings-and-runes` | `string-rune-bytes` | ✅ done |
| `struct-embedding` | `struct-embedding` | ✅ done |
| `structs` | `struct-fields` | ✅ done |
| `switch` | `switch-cases` | ✅ done |
| `temp-files-and-directories` | `temp-file-lifecycle` | ✅ done |
| `testing-and-benchmarking` | `test-benchmark-flow` | ✅ done |
| `text-templates` | `text-template-render` | ✅ done |
| `tickers` | `ticker-stream` | ✅ done |
| `time` | `time-fields` | ✅ done |
| `time-formatting-parsing` | `time-format-parse` | ✅ done |
| `timeouts` | `timeout-select` | ✅ done |
| `timers` | `timer-tick` | ✅ done |
| `url-parsing` | `url-parts` | ✅ done |
| `values` | `number-lines` | ✅ done |
| `variables` | `variables-bind` | ✅ done |
| `variadic-functions` | `params-array` | ✅ done |
| `waitgroups` | `waitgroup-counter` | ✅ done |
| `worker-pools` | `worker-pool` | ✅ done |
| `writing-files` | `write-file-buffer` | ✅ done |
| `xml` | `xml-roundtrip` | ✅ done |

---

## Suggested next batch

All examples currently have figure coverage. No additional batch is pending.
Binary file added docs/figure-pointers.png
Binary file added docs/figure-random-numbers.png
Binary file added docs/figure-range-over-built-in-types.png
Binary file added docs/figure-range-over-channels.png
Binary file added docs/figure-range-over-iterators.png
Binary file added docs/figure-rate-limiting.png
Binary file added docs/figure-reading-files.png
Binary file added docs/figure-recover.png
Binary file added docs/figure-recursion.png
Binary file added docs/figure-regular-expressions.png
Binary file added docs/figure-select.png
Binary file added docs/figure-sha256-hashes.png
Binary file added docs/figure-signals.png
Binary file added docs/figure-slices.png
Binary file added docs/figure-sorting-by-functions.png
Binary file added docs/figure-sorting.png
Binary file added docs/figure-spawning-processes.png
Binary file added docs/figure-stateful-goroutines.png
Binary file added docs/figure-string-formatting.png
Binary file added docs/figure-string-functions.png
Binary file added docs/figure-strings-and-runes.png
Binary file added docs/figure-struct-embedding.png
Binary file added docs/figure-structs.png
Binary file added docs/figure-switch.png
Binary file added docs/figure-temp-files-and-directories.png
Binary file added docs/figure-testing-and-benchmarking.png
Binary file added docs/figure-text-templates.png
Binary file added docs/figure-tickers.png
Binary file added docs/figure-time-formatting-parsing.png
Binary file added docs/figure-time.png
Binary file added docs/figure-timeouts.png
Binary file added docs/figure-timers.png
Binary file added docs/figure-url-parsing.png
Binary file added docs/figure-values.png
Binary file added docs/figure-variables.png
Binary file added docs/figure-variadic-functions.png
Binary file added docs/figure-waitgroups.png
Binary file added docs/figure-worker-pools.png
Binary file added docs/figure-writing-files.png
Binary file added docs/figure-xml.png
Loading
Loading