feat(www): fullscreen preview toggle with top-align and background fill #292
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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - "pras75299/initial-feature-setup" | |
| - "main" | |
| - "chore/**" | |
| - "feat/**" | |
| - "fix/**" | |
| pull_request: | |
| branches: | |
| - "pras75299/initial-feature-setup" | |
| - "main" | |
| jobs: | |
| test-and-lint: | |
| name: Test, Lint & Type-check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.3.0 | |
| - uses: pnpm/action-setup@v5.0.0 | |
| with: | |
| version: 10.33.0 | |
| - uses: actions/setup-node@v4.0.4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Validate changeset summary quality (PR only) | |
| if: github.event_name == 'pull_request' | |
| run: pnpm changeset:quality | |
| - name: Build CLI | |
| run: pnpm --dir packages/cli build | |
| - name: Check CLI ↔ README command drift | |
| run: pnpm check:cli-readme | |
| - name: Check agent instruction pointer drift | |
| run: pnpm check:agent-docs | |
| - name: Run workspace tests | |
| run: pnpm test | |
| - name: Run repo-level tests | |
| run: pnpm -w run test:repo | |
| - name: Lint workspaces | |
| run: pnpm lint | |
| - name: Check dead code | |
| run: pnpm deadcode | |
| - name: Type-check CLI | |
| run: pnpm --dir packages/cli exec tsc --noEmit | |
| - name: Type-check docs site | |
| run: pnpm --dir apps/www exec tsc --noEmit | |
| - name: Verify generated registry artifacts are up to date | |
| shell: bash | |
| run: | | |
| pnpm build:registry | |
| # Bash array keeps word-splitting safe in any shell a maintainer | |
| # might use to reproduce locally (zsh on macOS doesn't word-split | |
| # unquoted vars, so a `$PATHS` variable would pass to git as one | |
| # giant pathspec and silently match nothing). | |
| PATHS=(registry.json apps/www/public/registry.json apps/www/public/registry apps/www/public/r apps/www/components/ui apps/www/config/components.ts apps/www/config/docs-scenarios.ts apps/www/config/demos.tsx) | |
| # 1. Tracked-file drift: any diff in already-committed paths. | |
| git diff --exit-code -- "${PATHS[@]}" || (echo "" && echo "ERROR: generated registry/docs artifacts are out of sync." && echo "Run 'pnpm build:registry' locally and commit the updated generated files." && exit 1) | |
| # 2. Untracked-file drift: build emitted a NEW file (e.g. a new | |
| # component slug → new apps/www/public/r/<slug>.json) that the | |
| # contributor forgot to `git add`. git diff would not catch it. | |
| UNTRACKED=$(git ls-files --others --exclude-standard -- "${PATHS[@]}") | |
| if [ -n "$UNTRACKED" ]; then | |
| echo "" | |
| echo "ERROR: untracked generated registry/docs artifacts detected:" | |
| echo "$UNTRACKED" | sed 's/^/ - /' | |
| echo "Run 'pnpm build:registry' locally and 'git add' the new files." | |
| exit 1 | |
| fi | |
| - name: Validate generated registry artifacts (schema) | |
| run: pnpm registry:validate | |
| e2e-smoke: | |
| name: Docs site smoke (Playwright) | |
| runs-on: ubuntu-latest | |
| needs: test-and-lint | |
| steps: | |
| - uses: actions/checkout@v4.3.0 | |
| - uses: pnpm/action-setup@v5.0.0 | |
| with: | |
| version: 10.33.0 | |
| - uses: actions/setup-node@v4.0.4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v4 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('apps/www/package.json') }} | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: pnpm --dir apps/www test:e2e:install | |
| - name: Install Playwright OS deps | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' | |
| run: pnpm --dir apps/www exec playwright install-deps chromium | |
| - name: Build docs site | |
| run: pnpm --dir apps/www build | |
| - name: Run Playwright smoke | |
| run: pnpm --dir apps/www test:e2e | |
| - name: Upload Playwright report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: apps/www/playwright-report | |
| retention-days: 7 | |
| e2e-a11y: | |
| name: Docs site a11y (axe-core) | |
| runs-on: ubuntu-latest | |
| needs: test-and-lint | |
| steps: | |
| - uses: actions/checkout@v4.3.0 | |
| - uses: pnpm/action-setup@v5.0.0 | |
| with: | |
| version: 10.33.0 | |
| - uses: actions/setup-node@v4.0.4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v4 | |
| id: playwright-cache-a11y | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('apps/www/package.json') }} | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache-a11y.outputs.cache-hit != 'true' | |
| run: pnpm --dir apps/www test:e2e:install | |
| - name: Install Playwright OS deps | |
| if: steps.playwright-cache-a11y.outputs.cache-hit == 'true' | |
| run: pnpm --dir apps/www exec playwright install-deps chromium | |
| - name: Build docs site | |
| run: pnpm --dir apps/www build | |
| - name: Run axe a11y audit | |
| run: pnpm --dir apps/www test:e2e:a11y | |
| - name: Upload a11y report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: a11y-report | |
| path: apps/www/playwright-report | |
| retention-days: 7 | |
| e2e-perf: | |
| name: Docs site perf budgets (LCP/CLS) | |
| runs-on: ubuntu-latest | |
| needs: test-and-lint | |
| steps: | |
| - uses: actions/checkout@v4.3.0 | |
| - uses: pnpm/action-setup@v5.0.0 | |
| with: | |
| version: 10.33.0 | |
| - uses: actions/setup-node@v4.0.4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v4 | |
| id: playwright-cache-perf | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('apps/www/package.json') }} | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache-perf.outputs.cache-hit != 'true' | |
| run: pnpm --dir apps/www test:e2e:install | |
| - name: Install Playwright OS deps | |
| if: steps.playwright-cache-perf.outputs.cache-hit == 'true' | |
| run: pnpm --dir apps/www exec playwright install-deps chromium | |
| - name: Build docs site | |
| run: pnpm --dir apps/www build | |
| - name: Run perf budget tests | |
| run: pnpm --dir apps/www test:e2e:perf | |
| - name: Upload perf report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: perf-report | |
| path: apps/www/playwright-report | |
| retention-days: 7 |