Skip to content

chore: automated documentation screenshots with a shared example dataset - #1159

Draft
Anty0 wants to merge 12 commits into
mainfrom
jirikuchynka/doc-screenshots
Draft

Anty0 wants to merge 12 commits into
mainfrom
jirikuchynka/doc-screenshots

Conversation

@Anty0

@Anty0 Anty0 commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Automated documentation screenshots, driven by one shared example dataset.

What it adds

  • screenshots/app: a small Gradle module (:docs-screenshots) that tolgee-platform includes when this repo is checked out next to it, the same way billing is included. It serves one canonical dataset (organization Acme Corp, project Acme Shop, users Olivia Martin, Noah Clark and Emma Lee) at internal/e2e-data/docs, so every screenshot shows the same coherent example data. It force-enables EE features. On clean it hard-deletes the dataset's organizations so their slugs stay stable between runs.
  • screenshots/: a Cypress workspace that reuses the platform e2e helpers. Each spec pins the server and browser clock, captures in light theme at 2x, and hides test-only UI (the test-clock widget and announcements).
  • screenshots/runner/diff-and-write.mts: converts each capture to webp and writes it into static/ only when more than 0.5 % of pixels changed, so unchanged pages produce no git diff.
  • .github/workflows/refresh-screenshots.yml: a manually dispatched workflow. It builds the Tolgee image with the module, captures, and opens a bot/refresh-screenshots PR with the changed webps.

One page is converted so far: the AI settings prompts list (/img/docs/platform/ai-settings/prompts-list.webp). How to add the next one is in screenshots/README.md.

Notes for reviewers

  • The committed webp is unchanged in this PR. Text rendering differs between macOS and the Ubuntu runner, so the first workflow dispatch after merge produces the baseline. It will rewrite prompts-list.webp with the Acme Shop data.
  • Page-specific data on top of the shared dataset is not supported yet. The README says what adding it takes.
  • Platform side: chore: include the documentation screenshots module when present tolgee-platform#3988 (the conditional Gradle include and the devtools restart entry).
  • Because the include is directory-based, the module compiles into every local platform build that has this repo next to it. A platform refactor of the test-data DSL must keep this module compiling.

@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tolgee-docs ready!

Name Link
🔨 Latest commit f865efb
🔍 Latest deploy log https://app.netlify.com/projects/tolgee-docs/deploys/6ad254423df5f6796b5c48c6
😎 Deploy Preview https://deploy-preview-1159--tolgee-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant