Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ jobs:
- name: Install dependencies
run: npm ci

# Regenerate the documentation screenshots from the live app so they're
# always current, then build — `vite build` copies public/screenshots/
# into dist/screenshots/. Non-fatal: a transient capture failure should
# never block deploying the app; the docs page degrades to placeholders.
- name: Install Playwright (chromium)
run: npx playwright install --with-deps chromium

- name: Generate documentation screenshots
run: npm run screenshots
continue-on-error: true

- name: Build
run: npm run build

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ dist-ssr
/playwright-report/
/blob-report/
/playwright/.cache/

# Auto-generated documentation screenshots (regenerated on deploy)
/public/screenshots/
30 changes: 30 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="The complete guide to The Joy Matrix — a multidimensional extension of the Eisenhower Matrix that scores tasks by pleasure, talent, and capacity to move from A to B without burning anyone out." />
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f5f4f0" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1a1a18" />
<link rel="canonical" href="https://joy-matrix.com/docs/" />

<meta property="og:type" content="article" />
<meta property="og:site_name" content="The Joy Matrix" />
<meta property="og:title" content="The Joy Matrix — Documentation" />
<meta property="og:description" content="Every feature of The Joy Matrix, explained: the matrix, team, tasks, schedule, insights, the assignment + scheduling algorithms, theming, and data portability." />
<meta property="og:url" content="https://joy-matrix.com/docs/" />
<meta property="og:image" content="https://joy-matrix.com/og.png" />

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="The Joy Matrix — Documentation" />
<meta name="twitter:description" content="Every feature of The Joy Matrix, explained." />
<meta name="twitter:image" content="https://joy-matrix.com/og.png" />

<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect width='100' height='100' fill='%23f4ebdb'/%3E%3Ctext x='50' y='68' text-anchor='middle' font-family='Georgia,serif' font-style='italic' font-weight='900' font-size='60' fill='%23b8492a'%3EJ%3C/text%3E%3C/svg%3E" />
<title>The Joy Matrix — Documentation</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/docs/main.jsx"></script>
</body>
</html>
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"test:e2e:chromium": "playwright test --project=chromium-laptop",
"test:e2e:ui": "playwright test --ui",
"test:e2e:report": "playwright show-report",
"test:e2e:install": "playwright install --with-deps"
"test:e2e:install": "playwright install --with-deps",
"screenshots": "playwright test --config playwright.screenshots.config.ts"
},
"dependencies": {
"@talk2view/sdk": "^0.5.0",
Expand Down
43 changes: 43 additions & 0 deletions playwright.screenshots.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { defineConfig, devices } from "@playwright/test";

// Dedicated config for generating documentation screenshots. Separate from
// playwright.config.ts (the e2e suite) so it runs a single browser/viewport,
// loads real fonts, and writes into public/screenshots/. Invoke with
// `npm run screenshots`.

const PORT = 5173;

export default defineConfig({
testDir: "./tests/e2e/screenshots",
testMatch: "**/*.screenshots.ts",
fullyParallel: false,
workers: 1,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
timeout: 60_000,
expect: { timeout: 10_000 },
outputDir: "test-results/screenshots-artifacts",
reporter: [["list"]],

use: {
baseURL: `http://localhost:${PORT}`,
viewport: { width: 1280, height: 900 },
deviceScaleFactor: 2,
actionTimeout: 15_000,
navigationTimeout: 20_000,
},

projects: [
{
name: "docs",
use: { ...devices["Desktop Chrome"], viewport: { width: 1280, height: 900 }, deviceScaleFactor: 2 },
},
],

webServer: {
command: "npm run dev -- --port 5173 --strictPort",
url: `http://localhost:${PORT}`,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});
Loading
Loading