Add "Full usage demo" section to app store pages#130
Open
Alexgodoroja wants to merge 2 commits into
Open
Conversation
added 2 commits
July 15, 2026 13:32
Render each app's product_demo — the example-driven usage guide (when-to-use, first call, worked examples, and for metered apps a cost table + budget) — as a "Full usage demo" section on the app detail page and its plain (no-JS) twin. Additive and null-safe: apps without a demo render exactly as before. - src/data/app-demos.json: app-id -> product_demo, sourced from the app-template submissions (19 apps; the site attaches the ones present in its catalogue snapshot). - scripts/gen-apps.mjs + the App interface: parse product_demo into an optional productDemo field; apps.ts regenerated. - apps/[id].astro + the plain twin: the "Full usage demo" section with copy-pasteable commands and, for metered apps, an operation/price cost table. - appstore.css: theme-aware .demo-* styles reusing existing tokens.
# Conflicts: # scripts/gen-apps.mjs # src/data/apps.ts
Contributor
|
🚀 Preview deployed to Cloudflare Pages
|
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
Renders each app's
product_demo(from app-template#88) as a "Full usage demo" section on the app detail page and its plain (no-JS) twin: thewhen_to_useline, a "Run this first" call with expected output, the worked examples as copy-pasteable code blocks, and — for metered apps — an operation/price cost table with the free budget and worked total.How
src/data/app-demos.json— newapp-id → product_demomap sourced from the app-template submissions (19 apps). The site attaches the demos for apps present in its committed catalogue snapshot; the rest attach automatically on the next catalogue resync (pipeline matches by id, no code change).scripts/gen-apps.mjs+ theAppinterface — parseproduct_demointo an optionalproductDemofield;apps.tsregenerated. Apps with no entry getproductDemo: null.apps/[id].astro+ plain twin — the section renders only when a demo exists; commands reuse the existing copy-button handler.appstore.css— theme-aware.demo-*styles reusing existing tokens; the cost table and code blocks scroll inside their ownoverflow-xwrappers.Non-breaking
Additive and null-safe throughout — apps without a demo render exactly as today.
Verification
npm run buildsucceeds (362 pages).npm run check:plainpasses (91 pairs, no orphans, twins in sync).