Skip to content
Merged
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
23 changes: 18 additions & 5 deletions scripts/screenshots/pages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function pages() {
if (!row) throw new Error(`no snapshot ${name} in ${project} build ${number}`)
return `/acme/${project}/builds/${number}/snapshots/${row.id}`
}
return [
return bothThemes([
['landing', '/', false, ALL],
['docs/index', '/docs/', false, ALL],
// The blog's list (newest first: the order Nathan checks) and a post, whose header the docs pages share.
Expand All @@ -47,15 +47,28 @@ export function pages() {
// The repository picker: Acme's 60 repositories (web already a project, some only written to, some archived), a
// search, and side-project's pick half made
['app/repositories', '/acme/repositories', true, ALL],
['app/repositories/search', '/acme/repositories?q=pdf', true, ['1440-light', '390-light']],
['app/repositories/search', '/acme/repositories?q=pdf', true, ALL],
['app/repositories/progress', '/side-project/repositories', true, ALL],
// A personal organization's checklist: Ada's own installation, and Acme's listed under "Your other GitHub installations"
['app/org/personal', '/side-project', true, ['1440-light', '390-light']],
['app/org/personal', '/side-project', true, ALL],
// The organization's settings, for its admin and (read-only) for a member whose access follows GitHub
['app/org/settings', '/acme/settings', true, ALL],
['app/org/settings/member', '/acme/settings', MEMBER_EMAIL, ['1440-light', '1440-dark', '390-light']],
['app/org/settings/member', '/acme/settings', MEMBER_EMAIL, ALL],
['app/billing/team', '/acme/billing', true, ALL],
['app/billing/free', '/side-project/billing', true, ALL],
['app/account', '/account', true, ALL],
]
])
}

/** The pages, refused when one has a width in only one theme: the public gallery shows each screen in the reader's
* theme, and a page taken light only showed light screenshots in dark mode (4 Dec 2026, "Org, personal" and
* "Repositories, search" on visualci.com/screenshots/). */
export function bothThemes(list) {
const missing = list.flatMap(([name, , , variants]) =>
[...new Set(variants.map((v) => v.split('-')[0]))].flatMap((width) =>
['light', 'dark'].filter((theme) => !variants.includes(`${width}-${theme}`)).map((theme) => `${name} ${width}-${theme}`),
),
)
if (missing.length) throw new Error(`screenshots in one theme only, add the other: ${missing.join(', ')}`)
return list
}
Loading