-
Notifications
You must be signed in to change notification settings - Fork 35
docs: add editor hero, live-demo link, social card, and "Why Apollon" #823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
5b5bbc5
020b801
36c42fa
0f6468e
5552472
047aede
44c84c5
78dcaa6
dc3c35e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@tumaet/apollon": patch | ||
| --- | ||
|
|
||
| Add an editor screenshot to the npm README so the package page shows the product, not just badges. The image is generated from the live editor by the `readme-assets` Playwright project and hosted from the repository. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,10 +41,14 @@ export default defineConfig({ | |
| { | ||
| name: "chromium", | ||
| // The perf suite has its own serial, retry-free project below; keep it | ||
| // out of the parallel functional run. The how-to-use spec is owned by the | ||
| // dedicated "howto-assets" project (different snapshotPathTemplate), so | ||
| // exclude it here too. | ||
| testIgnore: ["**/perf/**", "**/how-to-use.visual.spec.ts"], | ||
| // out of the parallel functional run. The how-to-use and readme-assets | ||
| // specs are owned by their dedicated projects (different | ||
| // snapshotPathTemplates), so exclude them here too. | ||
| testIgnore: [ | ||
| "**/perf/**", | ||
| "**/how-to-use.visual.spec.ts", | ||
| "**/readme-assets.visual.spec.ts", | ||
| ], | ||
| use: { | ||
| ...devices["Desktop Chrome"], | ||
| viewport: { width: 1280, height: 720 }, | ||
|
|
@@ -65,6 +69,27 @@ export default defineConfig({ | |
| viewport: { width: 1280, height: 720 }, | ||
| }, | ||
| }, | ||
| { | ||
| // Generates the public-facing marketing assets — the README hero | ||
| // screenshots (light + dark) and the 1280×640 GitHub social preview | ||
| // card — straight from the live editor, same one-source-of-truth | ||
| // pattern as howto-assets. Its snapshotPathTemplate writes (and reads, | ||
| // for the regression diff) the exact PNGs README.md, library/README.md, | ||
| // and docs/docusaurus.config.ts reference under docs/static/img/. | ||
| // Regenerate with: | ||
| // pnpm exec playwright test --project readme-assets --update-snapshots | ||
| name: "readme-assets", | ||
| testMatch: "**/readme-assets.visual.spec.ts", | ||
| snapshotPathTemplate: "{testDir}/../../../docs/static/img/{arg}{ext}", | ||
| use: { | ||
| ...devices["Desktop Chrome"], | ||
| // Larger viewport + 2× scale so the hero holds up at README width on | ||
| // high-DPI displays. The social-card test overrides both to hit | ||
| // GitHub's exact 1280×640 spec. | ||
| viewport: { width: 1440, height: 810 }, | ||
| deviceScaleFactor: 2, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @FelixTJDietrich [low] Playwright’s 🤖 Prompt for AI agentsIn
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct at the time — the default |
||
| }, | ||
| }, | ||
| // Firefox is where the Apollon-in-Artemis exam freeze was observed, so the | ||
| // functional suite should run there too. It's opt-in (PLAYWRIGHT_FIREFOX=1 | ||
| // via `pnpm test:e2e:firefox`) so the default run — and CI that only | ||
|
|
@@ -74,9 +99,13 @@ export default defineConfig({ | |
| ? [ | ||
| { | ||
| name: "firefox", | ||
| // The how-to-use assets are baselined once, in the pinned chromium | ||
| // "howto-assets" project; don't regenerate/diff them on firefox. | ||
| testIgnore: ["**/perf/**", "**/how-to-use.visual.spec.ts"], | ||
| // The how-to-use and readme assets are baselined once, in their | ||
| // pinned chromium projects; don't regenerate/diff them on firefox. | ||
| testIgnore: [ | ||
| "**/perf/**", | ||
| "**/how-to-use.visual.spec.ts", | ||
| "**/readme-assets.visual.spec.ts", | ||
| ], | ||
| use: { | ||
| ...devices["Desktop Firefox"], | ||
| viewport: { width: 1280, height: 720 }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FelixTJDietrich [low] Because these badge links are each on their own line inside the raw
<div>, GitHub’s GFM renderer inserts<br>elements between them and displays a vertical stack instead of a grouped badge row. Put all three badge links on one Markdown line, or use one HTML<p>with adjacent anchors.🤖 Prompt for AI agents
In
README.md, the three badge links on lines 8–10 render as separate rows because each Markdown link is on its own line inside the raw centered<div>. Make the badges render horizontally by putting the three Markdown badge links on one line or replacing them with a single HTML paragraph containing adjacent linked images.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked against GitHub's actual rendering (
GET /repos/.../readmewithAccept: application/vnd.github.htmlon this branch): all three badge anchors land in a single<p dir="auto">with no<br>between them — they render as one horizontal row. Newline-as-hard-break is comment-mode markdown; file/README mode treats single newlines as soft breaks (spaces), even inside the centered<div>. Leaving the one-badge-per-line source as is, since it renders grouped and diffs cleaner.