Repository navigation
Printable 5 × 7 QR flyer + PWA install invitation - #21
Merged
Merged
Conversation
Flyer - src/services/flyer: declarative vector scene (360 x 504 pt = 5 x 7 in), QR generation with a 4-module quiet zone (EC level Q) and a lazy pdf-lib renderer that emits a single print-ready page with MediaBox = CropBox. - The QR code may only encode the production site: VITE_PUBLIC_SITE_URL wins, otherwise the served origin is used only when it is a real https production address (localhost, 127.x, *.local, e2b previews and Vercel preview/branch hosts are rejected). Otherwise the UI shows a configuration warning and generates nothing - no dummy URL, no fake download. - Download PokeGuru Flyer (exact filename PokeGuru-5x7-QR-Flyer.pdf) and Print flyer actions, plus a live vector preview, surfaced in the footer, the homepage 'Share PokeGuru' panel and the About page. PWA install invitation - InstallPrompt: 'Take PokeGuru with you!' shown ~7s after load, only when the browser fired beforeinstallprompt or on iOS (share-sheet instructions). prompt() is called only after Install is chosen; dismissals are remembered for 60 days; hidden when already running standalone. Tests: PDF page count/box, QR decoded with the independent jsqr decoder, origin resolution rules, install-prompt behaviour. Docs: README + .env.example. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
This was referenced Nov 14, 2026
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.
What
🎴 Download PokeGuru Flyer — a print-ready, single-page PDF (
PokeGuru-5x7-QR-Flyer.pdf) generated in the browser on demand:VITE_PUBLIC_SITE_URL, else the served origin — only whenhttps, no path/query/hash, and notlocalhost/127.x/*.local/*.e2b.app/Vercel preview or branch hosts. Otherwise a clear configuration warning and no PDF.PWA install invitation — “Take PokeGuru with you!” card:
beforeinstallpromptis captured (default prevented) andprompt()is only called after Install PokeGuru is clicked.Verification
npx tsc --noEmit,npx eslint .,npm run build— clean.npx vitest run— 150 passed (18 new).tests/flyer.test.tsre-opens the generated PDF (page count 1, 360 × 504 pt, portrait) and decodes the QR with the independentjsqrdecoder, asserting the payload ishttps://pokeguru.vercel.app.Docs
README: flyer section (sizes, printing at 100%, URL configuration, QR verification) and the install-invitation behaviour;
.env.examplenotes thatVITE_PUBLIC_SITE_URLalso drives the printed QR code.