Repository navigation
Add a theme gallery rendered headlessly from every registered theme - #135
Merged
Merged
Conversation
Adds tests/ThemeProvider.UITests, which draws a fixed sample window for each ThemeRegistry entry through ImGuiPaletteMapper under ImGuiAppHarness, plus an overview of all themes, and writes the PNGs and a captioned README.md to a temporary directory, or to THEMEPROVIDER_GALLERY_OUT when set. The theme-gallery workflow runs those tests on main after CI passes and commits docs/gallery back as LFS objects when the pictures change. It is a called workflow plus workflow_dispatch, never workflow_run. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWRBkw7bXdWGzuLpqnCvrB
Path.Join keeps the output directory even if a later segment is rooted. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWRBkw7bXdWGzuLpqnCvrB
|
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.



Requested by Matt · project thread
Before: The only way to see what a theme looks like was to run
ThemeProvider.Demoon a desktop.After:
docs/gallery/will hold 39 pictures and a captionedREADME.md, kept current frommain:overview.png: all 38 themes on one page. Each row is drawn in that theme's background colour, with its name in its text colour, its neutral ramp, and one chip per accent meaning.ThemeRegistry.AllThemesentry, named by slug (catppuccin-mocha.png,gruvbox-light.png,vscode-light.png, …). Each is a 760x448 sample window themed throughImGuiPaletteMapper. It contains:A theme added to the registry gets a picture automatically.
EveryThemeHasAPicturechecks this.This PR commits no PNGs and no
docs/gallery/README.md. They arrive on the first push tomainafter this merges, or when the Theme Gallery workflow is dispatched onmain. The README gains one line that links to the gallery index.How:
tests/ThemeProvider.UITestsproject. It is MSTest underImGuiAppHarnessand has been added to the solution.ktsu.ImGui.App.Testing3.64.1 is added toDirectory.Packages.props. The project lives undertests/*.UITests/, so the shared pipeline runs it on Linux only.THEMEPROVIDER_GALLERY_OUTnames one..github/workflows/theme-gallery.yml, modelled on ImGuiApp'swidget-gallery.yml.workflow_callandworkflow_dispatch, neverworkflow_run.ktsu-dev/ThemeProvideronmain.docs/gallery, refusing any PNG that is not an LFS pointer.[bot][skip ci] Regenerate the theme gallery, then pushes with a rebase-and-retry loop.ci.ymlcalls it in atheme-galleryjob that needsci, only on a push tomain.Verified:
ThemeProvider.Test: 77/77 passed.ThemeProvider.UITests: 41/41 passed.cmp).🤖 Generated with Claude Code
https://claude.ai/code/session_01WWRBkw7bXdWGzuLpqnCvrB
Generated by Claude Code