Add PDF/SVG exports, wire up tooltip a11y, drop leftover footer branding#6
Merged
Merged
Conversation
…edby - scripts/export-pdf.js prints index.html to exports/ai-agent-patterns.pdf via Playwright, with a new @media print block hiding the toolbar and preventing cards from splitting across page breaks. - scripts/export-svg.js extracts each pattern's flow diagram as a fully standalone exports/svg/pattern-{slug}.svg by baking computed styles and inlining the shared arrow marker/shadow filter defs. - Both wired into npm scripts and ci.yml's PR validation smoke test. - Statefulness meta value now has aria-describedby pointing at a visually hidden span with the same tooltip text, since the CSS ::after tooltip isn't exposed to screen readers. - Removed the leftover "Built with Claude" site footer text. - Updated CLAUDE.md/README.md to document all of the above.
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
Closes out the remaining items from the last gap analysis:
scripts/export-pdf.js— printsindex.htmltoexports/ai-agent-patterns.pdfvia Playwright. Added a@media printblock toindex.htmlthat hides the toolbar and keeps cards from splitting across page breaks.scripts/export-svg.js— extracts each pattern's flow diagram as a standaloneexports/svg/pattern-{slug}.svg. Bakes every element's resolvedfill/stroke/font-*/filterviagetComputedStyleand inlines the shared#arrowmarker +#nodeShadowfilter<defs>, so each file opens correctly with zero dependency on the page's stylesheet or CSS custom properties.package.json(npm run export:pdf/export:svg) and intoci.yml's PR validation smoke test.aria-describedbypointing at a visually-hidden (.sr-only) span carrying the same explanation text, since the CSS::aftertooltip content isn't reliably exposed to screen readers.CLAUDE.mdandREADME.mdto document all of the above.Test plan
npm run validatepasses (15/15 patterns)aria-describedbyresolves to the correct hidden text for a sample cardexport:images/export:pptxafter the footer/CSS edits — no regressionsGenerated by Claude Code