Repository navigation
v1.0.0
TemplateViewer
v1.0.0 (2026-10-15)
Full Changelog Previous Releases
- Release workflow: package tags with the BigWigs packager for GitHub and CurseForge
Adds .github/workflows/release.yml (tag push -> BigWigsMods/packager@v2.6.1, as in
BetterBags) and ## X-Curse-Project-ID: 1745723 so the packager uploads to the
TemplateViewer CurseForge project. CF_API_KEY / WAGO_API_TOKEN come from repo secrets;
there is no Wago project yet, so no X-Wago-ID. - List every template: generated catalog, GetTemplates merge, raw rendering, /tv audit
tv listed only its two curated templates. It now lists all of them: curated entries
first, then every template retail's UI defines, plus anything else
C_XMLUtil.GetTemplates() reports (other addons' templates).
Catalog- tools/ui_source.lua (moved from spec/helpers) now reads TOCs per the wiki's rules
(warcraft.wiki.gg/wiki/TOC_format):- TOC choice: _Standard, then _Mainline, then the plain TOC.
- Repeated AllowLoadGameType/ExcludeLoadGameType/Dep*/LoadWith lines append; LoadWith
implies on-demand; [TextLocale] expands; OnlyBetaAndPTR addons are excluded. - On-demand addons that a login addon requires are loaded at login. For example,
Blizzard_WorldMap requires Blizzard_MapCanvas, and WorldMapFrameTemplate inherits
MapCanvasFrameTemplate. A spec pins that no login template inherits an unloaded one. - It derives two global side effects per template: fixed global child names, and
Edit Mode system registration.
- tools/generate_catalog.lua writes data/catalog_mainline.lua, which ships with the
addon. It covers 3,581 templates in 779 files, 1,021 of them from 84 on-demand addons,
and flags 67 with side effects. A spec fails if the committed file is stale. - core/catalog.lua merges curated entries, the catalog and GetTemplates(). Entry
identities stay stable across rebuilds, and the list rebuilds on ADDON_LOADED.
Rendering - Uncurated templates render only on request (Render, or the Auto-render toggle).
Building one runs its scripts, and the instance can't be destroyed. - Raw instances:
- drop the events they registered during creation;
- stop taking keyboard focus if they're edit boxes;
- get sample text if they're Font, FontFamily or FontString templates;
- get a 256 fallback for any size they don't declare.
Line templates are now built with CreateLine.
- Anchoring, setup and raw preparation each run under xpcall, and their errors are
recorded. - Templates that create fixed global frames (e.g. RaidFramePreviewTemplate replaces
RaidFrameSettingsPreviewFrame) or register with Edit Mode show a warning and a
"Render anyway" button. Auto-render never builds them. - Templates from unloaded on-demand addons offer "Load " (C_AddOns.LoadAddOn).
The preview refreshes when an addon load defines the template it is showing.
/tv audit - Whether GetTemplates() lists everything the client defines is undocumented.
/tv audit compares GetTemplates(), the catalog and GetTemplateInfo, prints a summary,
and saves the report to the TemplateViewerAudit SavedVariable so it can be read from
disk after /reload.
UI - List rows: curated names in gold with their category; other templates in white with
", "; undefined templates dimmed. - The info panel gains an Addon row and falls back to catalog data for templates the
client hasn't defined yet. The footer counts templates. - Search ranks the name, then the group (category, or addon for uncurated templates),
then the description, with cached lowercase keys.
Fake client - C_AddOns.LoadAddOn loads required dependencies first, then LoadWith addons, with one
ADDON_LOADED each. IsAddOnLoaded is added. - Added UnregisterAllEvents, CreateLine, CheckButton click toggling and a
UICheckButtonTemplate fake. GetTemplates omissions can be simulated. - The fake ScrollBox realises only the visible rows, like the client.
- The new behaviours are pinned in spec/wow_mocks_spec.lua.
187 tests, luacheck clean. Docs updated: CLAUDE.md, README, .claude/rules/*.
- tools/ui_source.lua (moved from spec/helpers) now reads TOCs per the wiki's rules
- TemplateViewer: preview Blizzard XML templates the way TextureAtlasViewer previews atlases
tv is a pure (no Ace, no LibStub) retail addon that lists curated Blizzard XML frame
templates and renders a live instance of the selected one with the running client, so
it shows exactly how that client draws the template (art, fonts, atlas remaps).
Addon- core/templates.lua wraps C_XMLUtil.GetTemplateInfo. It never caches, because
load-on-demand Blizzard addons define templates when they load. - core/registry.lua validates showcase entries (template, category, description, size,
setup) and raises at the call site on typos, bad types or duplicates. - core/search.lua does plain-text, case-insensitive filtering, ranking template-name
hits over category over description. - core/stage.lua builds each template once (widgets can't be destroyed). It uses the
widget type the client reports, as Blizzard's FrameUtil.CreateFrame does; Texture and
FontString templates become regions. Instances get global names, and failed creates
or setups are captured. - ui/ is the window, built on first open:
- a PortraitFrameTemplate window with a SearchBoxTemplate and a ScrollBox list;
- a clipping preview canvas with wheel zoom, drag pan, Reset View and background
presets; - an info panel with a copyable name, type, size, inherits, source, KeyValues and
description.
The window won't open in combat and closes when combat starts (templates may be
protected). Escape closes it. /tv and /templateviewer toggle it; "/tv " opens it
searching for .
- Starter showcase: UIPanelButtonTemplate (SetTextToFit, tooltipText) and
ButtonFrameTemplate (SetTitle, SetPortraitToAsset).
Test harness (busted, Lua 5.1) - spec/helpers/ui_source.lua indexes the ~3,580 templates retail loads straight from
Blizzard's XML. It follows the client's own TOC load rules: _Mainline TOCs,
AllowLoad/AllowLoadGameType/ExcludeLoadGameType/AllowLoadTextLocale, [Family] and
[Game] placeholders, and . Every name resolves to one definition and
load-on-demand templates are flagged. - wow_mocks.lua is a fake client. Templates resolve through that index, so unknown or
LoD templates fail as in game. XML and are applied and script names
are validated per widget type. OnShow/OnHide follow visibility changes.
GetTemplateInfo reports inherited sizes. AnchorProblems flags anchor sets that real
layout would break. - framexml_fakes.lua transcribes the FrameXML tv touches (portrait frames, panel
buttons, search box, ScrollBox list, HideUIPanel), citing Blizzard source lines. - The specs cover every module, every showcase entry (against retail XML and through
the real Stage), the TOC (files listed, Interface matches the UI source build), the
fake client's own contract, and anchor consistency across the whole window.
112 tests; luacheck clean.
Tooling and docs - install-deps.sh fetches Gethe/wow-ui-source (live, 12.1.5.70391) and Ketho's
vscode-wow-api annotations into the gitignored .libraries/, pinned to commits so
local and CI runs test the same build. - CI workflows for busted with coverage and luacheck, .luacov, .luarc.json, and a
.pkgmeta ignore list. - CLAUDE.md (AGENTS.md/GEMINI.md symlinks) and .claude/rules/ document the
architecture, the showcase entry contract, the test harness, and the behaviours that
still need checking in a real client.
- core/templates.lua wraps C_XMLUtil.GetTemplateInfo. It never caches, because