Skip to content

Commit 97a0517

Browse files
authored
docs: adds compact view screenshot to README (#60)
* docs: adds compact view screenshot to README * fix(screenshot): uses client-side nav to switch density mode * docs: expands 3 repo groups in both screenshots
1 parent e81b37c commit 97a0517

File tree

4 files changed

+41
-8
lines changed

4 files changed

+41
-8
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,16 @@ A dashboard for tracking GitHub issues, PRs, and Actions workflow runs across ma
88

99
**Live demo:** https://gh.gordoncode.dev
1010

11-
![Dashboard](docs/dashboard-screenshot.png)
11+
<table>
12+
<tr>
13+
<td align="center"><strong>Comfortable</strong></td>
14+
<td align="center"><strong>Compact</strong></td>
15+
</tr>
16+
<tr>
17+
<td><img src="docs/dashboard-screenshot.png" alt="Dashboard — comfortable view"></td>
18+
<td><img src="docs/dashboard-screenshot-compact.png" alt="Dashboard — compact view"></td>
19+
</tr>
20+
</table>
1221

1322
## Documentation
1423

83.1 KB
Loading

docs/dashboard-screenshot.png

7.07 KB
Loading

e2e/capture-screenshot.spec.ts

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -461,15 +461,39 @@ test("capture dashboard screenshot", async ({ page }) => {
461461
await page.getByRole("tab", { name: /pull requests/i }).click();
462462
await page.getByRole("tab", { name: /pull requests/i, selected: true }).waitFor();
463463

464-
// Wait for repo group headers to render (visible even when collapsed)
465-
await page.getByText("acme-corp/web-platform").first().waitFor();
464+
// Expand several repo groups for a richer screenshot
465+
const reposToExpand = ["acme-corp/web-platform", "openstack/nova", "acme-corp/api-gateway"];
466466

467-
// Expand a repo group by clicking its header button (scoped to avoid notification bell)
468-
const repoGroupBtn = page.getByRole("button", { expanded: false }).filter({ hasText: "acme-corp/web-platform" });
469-
if (await repoGroupBtn.isVisible()) {
470-
await repoGroupBtn.click();
471-
await page.getByRole("button", { expanded: true }).filter({ hasText: "acme-corp/web-platform" }).waitFor();
467+
await page.getByText("acme-corp/web-platform").first().waitFor();
468+
for (const repo of reposToExpand) {
469+
const btn = page.getByRole("button", { expanded: false }).filter({ hasText: repo });
470+
if (await btn.isVisible()) {
471+
await btn.click();
472+
await page.getByRole("button", { expanded: true }).filter({ hasText: repo }).waitFor();
473+
}
472474
}
473475

474476
await page.screenshot({ path: "docs/dashboard-screenshot.png" });
477+
478+
// Switch to compact density via settings UI (client-side nav to preserve store state)
479+
await page.getByRole("link", { name: "Settings" }).click();
480+
await page.getByRole("button", { name: /view density: compact/i }).waitFor();
481+
await page.getByRole("button", { name: /view density: compact/i }).click();
482+
await page.getByRole("button", { name: /view density: compact/i, pressed: true }).waitFor();
483+
484+
// Navigate back to dashboard (client-side, no full reload)
485+
await page.getByRole("link", { name: "Back to dashboard" }).click();
486+
await page.getByRole("tablist").waitFor();
487+
await page.getByRole("tab", { name: /pull requests/i }).click();
488+
await page.getByRole("tab", { name: /pull requests/i, selected: true }).waitFor();
489+
await page.getByText("acme-corp/web-platform").first().waitFor();
490+
for (const repo of reposToExpand) {
491+
const btn = page.getByRole("button", { expanded: false }).filter({ hasText: repo });
492+
if (await btn.isVisible()) {
493+
await btn.click();
494+
await page.getByRole("button", { expanded: true }).filter({ hasText: repo }).waitFor();
495+
}
496+
}
497+
498+
await page.screenshot({ path: "docs/dashboard-screenshot-compact.png" });
475499
});

0 commit comments

Comments
 (0)