Public: anyone can read this; the crew can change it.
Every bare "No …" empty state is drawn from src/core/empty_words.ts, and the OWN_WORDS count table is deleted #18355
Merged 2h 7m ago, live in production
mason/forge:mason/18351-every-bare-no-empty-state-is-drawn-from → main 0 commits fork 1 thread · 1 unresolved
30 files
changed +113
−121
- scripts/design-lint.ts
- src/core/empty_words.ts
- src/design/ratchets.ts
- src/web/diff-view.ts
- src/web/empty_words.ts
- src/web/pages/boards.ts
- src/web/pages/browse.ts
- src/web/pages/build_shots.ts
- src/web/pages/commits.ts
- src/web/pages/contribute.ts
- src/web/pages/display.ts
- src/web/pages/family.ts
- src/web/pages/inventory.ts
- src/web/pages/issues.ts
- src/web/pages/looks.ts
- src/web/pages/notes.ts
- src/web/pages/origin-flow.ts
- src/web/pages/origins.ts
- src/web/pages/packs.ts
- src/web/pages/pull.ts
- src/web/pages/reports.ts
- src/web/pages/sources.ts
- src/web/studio/explore.ts
- src/web/studio/hold.ts
- test/design-lint-ratchets.test.ts
- test/empty-notes.test.ts
- test/empty-words-all.test.ts
- test/holds.test.ts
- test/packs.test.ts
- test/web-origins.test.ts
scripts/design-lint.ts +4 −5
| @@ -81,7 +81,7 @@ import { scanFeel, staleAllows } from "../src/design/feel.ts"; | ||
| 81 | 81 | import { motionFindings } from "../src/design/motion.ts"; |
| 82 | 82 | import { PHONE_PX, widthFindings } from "../src/design/width.ts"; |
| 83 | 83 | import { cssBlocksAt, scanOverlay, sourceFiles } from "../src/design/overlay.ts"; |
| 84 | import { ownWordsOff, type Source, tsSources, WIDTH_SKIP, widthReadsOver } from "../src/design/ratchets.ts"; | |
| 84 | import { bareNoFindings, type Source, tsSources, WIDTH_SKIP, widthReadsOver } from "../src/design/ratchets.ts"; | |
| 85 | 85 | |
| 86 | 86 | // The covered-page rule lives in src/design/ so the release preflight runs it too (#11916). |
| 87 | 87 | export { motionFindings, type MotionFinding } from "../src/design/motion.ts"; |
| @@ -675,12 +675,11 @@ export function scanRing(root: string): string[] { | ||
| 675 | 675 | |
| 676 | 676 | /** |
| 677 | 677 | * The two ratchets the check most often refused for (#17521): a page's own bare "No …" empty state |
| 678 | * beyond OWN_WORDS (or fewer than it names), and a width read in script beyond WIDTH_READS. The | |
| 679 | * same counts and words as test/empty-words-all.test.ts and test/behaviors-rule.test.ts. | |
| 678 | * anywhere under src/web, and a width read in script beyond WIDTH_READS. The | |
| 679 | * same findings as test/empty-words-all.test.ts (bare "No …") and test/behaviors-rule.test.ts (widths). | |
| 680 | 680 | */ |
| 681 | 681 | export function ratchetFindings(web: readonly Source[], src: readonly Source[]): string[] { |
| 682 | const own = ownWordsOff(web); | |
| 683 | return [...own.over, ...own.moved, ...widthReadsOver(src)]; | |
| 682 | return [...bareNoFindings(web), ...widthReadsOver(src)]; | |
| 684 | 683 | } |
| 685 | 684 | /** Each over the files its test reads: every file under src/web, and src/ but for WIDTH_SKIP. */ |
| 686 | 685 | export function scanRatchets(root: string): string[] { |
src/core/empty_words.ts +20 −2
| @@ -102,6 +102,22 @@ const TABLE = { | ||
| 102 | 102 | cloudResources: { sentence: "No cloud account is attached.", reason: "Attach one and the forge reads what it holds and what it costs." }, |
| 103 | 103 | gamePluginConfigs: { sentence: "No plugin config file is kept in the repository yet.", reason: "Add one below: it is a commit to the compose file." }, |
| 104 | 104 | gameSnapshots: { sentence: "No snapshot yet.", reason: "One is taken before every import or restore." }, |
| 105 | // Lists a page used to word itself (#18351); each page's own words, drawn from here. | |
| 106 | diffChanges: { sentence: "No changes." }, | |
| 107 | commitsPaged: { sentence: "No commits on this page.", reason: "You have paged past the end of this history." }, | |
| 108 | commitsShown: { sentence: "No commits to show." }, | |
| 109 | displayBuilds: { sentence: "No builds.", reason: "This display shows no builds yet." }, | |
| 110 | issueRepos: { sentence: "No repository to open an issue in.", reason: "Open one from a repository you can see." }, | |
| 111 | lookPicture: { sentence: "No picture yet.", reason: "One is taken when the preview comes up green." }, | |
| 112 | originAccount: { sentence: "No account connected.", reason: "Connect the account the apps live on, and what is left there is listed here." }, | |
| 113 | originConnect: { sentence: "No such connect.", reason: "It finished, expired, or was never yours. Start again from Connected accounts." }, | |
| 114 | templateForges: { sentence: "No forges to show for that template.", reason: "Only admins can list forges started from a template." }, | |
| 115 | shots: { sentence: "No screenshots on {} yet." }, | |
| 116 | welcomeIssues: { sentence: "No open issue carries {} right now." }, | |
| 117 | familyAlone: { sentence: "No parent, and none sent." }, | |
| 118 | notes: { sentence: "No notes yet.", reason: "Write one above." }, | |
| 119 | reportsMatch: { sentence: "No security reports match." }, | |
| 120 | visits: { sentence: "No visits recorded for {}." }, | |
| 105 | 121 | } as const satisfies Readonly<Record<string, EmptyWords>>; |
| 106 | 122 | |
| 107 | 123 | /** What Start a game box asks Talk, from the page and the terminal: `infra` plans one free, and the forge asks before it builds. */ |
| @@ -114,9 +130,11 @@ export const EMPTY_WORDS: Readonly<Record<EmptyKind, EmptyWords>> = TABLE; | ||
| 114 | 130 | /** |
| 115 | 131 | * The sentence and its reason as one line of text: the terminal's empty screens and `emptyLine`. |
| 116 | 132 | */ |
| 117 | export function emptyText(kind: EmptyKind): string { | |
| 133 | export function emptyText(kind: EmptyKind, subject?: string): string { | |
| 118 | 134 | const w: EmptyWords = TABLE[kind]; |
| 119 | return w.reason === undefined ? w.sentence : `${w.sentence} ${w.reason}`; | |
| 135 | const text = w.reason === undefined ? w.sentence : `${w.sentence} ${w.reason}`; | |
| 136 | // A `{}` in the table's words is the one thing the page names (a build, a label); the words stay here. | |
| 137 | return subject === undefined ? text : text.replaceAll("{}", () => subject); | |
| 120 | 138 | } |
| 121 | 139 | |
| 122 | 140 | /** |
src/design/ratchets.ts +14 −45
| @@ -1,9 +1,10 @@ | ||
| 1 | 1 | /** |
| 2 | * Two per-file ratchets, counted once (#17521): a page's own bare "No …" empty state (#15851) and a | |
| 3 | * width read in script (#13783). test/empty-words-all.test.ts and test/behaviors-rule.test.ts hold | |
| 4 | * them; scripts/design-lint.ts prints the same findings, so a builder sees them before the push. | |
| 5 | * Each table names a file's count today; a file may hold no more, and an empty-words count must be | |
| 6 | * exact, so moving one off shrinks it and a new one fails. | |
| 2 | * Two per-file ratchets, counted once (#17521): a page's own bare "No …" empty state (#15851, now | |
| 3 | * none at all: #18351) and a width read in script (#13783). test/empty-words-all.test.ts and | |
| 4 | * test/behaviors-rule.test.ts hold them; scripts/design-lint.ts prints the same findings, so a | |
| 5 | * builder sees them before the push. The width table names a file's count today; a file may hold no | |
| 6 | * more. A bare "No …" has no table: none is allowed, whether a page words it in markup or hands it | |
| 7 | * to a helper as `sentence:`. | |
| 7 | 8 | * |
| 8 | 9 | * This module lives in src/design/, not src/web/, because the empty-words scan reads every file |
| 9 | 10 | * under src/web. The width pattern spells its words with a character class so this file reads no |
| @@ -18,9 +19,7 @@ import { join } from "node:path"; | ||
| 18 | 19 | */ |
| 19 | 20 | export const RATCHET_FIX = { |
| 20 | 21 | ownWordsOver: |
| 21 | "Fix: add the words to the EMPTY_WORDS table (src/core/empty_words.ts) and draw them with emptyList(kind); never raise the file's count in OWN_WORDS.", | |
| 22 | ownWordsMoved: | |
| 23 | "Fix: it moved to the table, so lower the file's count in OWN_WORDS (src/design/ratchets.ts) to match, or delete its line at 0; lowering is the right move.", | |
| 22 | "Fix: add the words to the EMPTY_WORDS table (src/core/empty_words.ts) and draw them with emptyList(kind), emptyLine(kind) or emptySection(kind); a bare \"No …\" under src/web is an error.", | |
| 24 | 23 | widthOver: |
| 25 | 24 | "Fix: answer the width with a media or container query in CSS, or a behavior in src/web/behaviors.ts; never raise the file's count in WIDTH_READS (src/design/ratchets.ts).", |
| 26 | 25 | ownScriptNew: |
| @@ -50,48 +49,18 @@ export function tsSources(root: string, dir: string, skip?: RegExp): Source[] { | ||
| 50 | 49 | // A page's own "No …" empty state, in either form: empty({ title: "No …" }) (one line or several) |
| 51 | 50 | // or an inline <p class="… muted …">No …</p>, whatever classes sit beside muted and whatever |
| 52 | 51 | // follows. A new empty state goes in src/core/empty_words.ts and is drawn with emptyList(kind). |
| 53 | const OWN_FORM = /empty\(\{\s*(?:icon: [^,]+,\s*)?title: [`"]No |empty\("No |<p class="(?:[^"]* )?muted(?: [^"]*)?">\s*No /g; | |
| 54 | // What is left is split into #15899 (admin, system), #15900 (boards, bets, flows), #15901 | |
| 55 | // (repository pages), #15902 (apps, forges) and #15903 (studio, renderers); #15851 waits for them. | |
| 56 | export const OWN_WORDS: Readonly<Record<string, number>> = { | |
| 57 | "src/web/diff-view.ts": 1, | |
| 58 | "src/web/pages/boards.ts": 1, | |
| 59 | "src/web/pages/browse.ts": 1, | |
| 60 | "src/web/pages/build_shots.ts": 1, | |
| 61 | "src/web/pages/commits.ts": 1, | |
| 62 | "src/web/pages/contribute.ts": 1, | |
| 63 | "src/web/pages/display.ts": 1, | |
| 64 | "src/web/pages/family.ts": 1, | |
| 65 | "src/web/pages/inventory.ts": 1, | |
| 66 | "src/web/pages/issues.ts": 1, | |
| 67 | "src/web/pages/looks.ts": 1, | |
| 68 | "src/web/pages/notes.ts": 1, | |
| 69 | "src/web/pages/origin-flow.ts": 1, | |
| 70 | "src/web/pages/origins.ts": 1, | |
| 71 | "src/web/pages/packs.ts": 2, | |
| 72 | "src/web/pages/pull.ts": 1, | |
| 73 | "src/web/pages/reports.ts": 1, | |
| 74 | "src/web/pages/sources.ts": 1, | |
| 75 | "src/web/studio/explore.ts": 1, | |
| 76 | "src/web/studio/hold.ts": 1, | |
| 77 | }; | |
| 78 | ||
| 52 | const OWN_FORM = /empty\(\{\s*(?:icon: [^,]+,\s*)?title: [`"]No |empty\("No |<p class="(?:[^"]* )?muted(?: [^"]*)?">\s*No |\bsentence: [`"]No /g; | |
| 79 | 53 | /** How many bare "No …" empty states the text words itself. */ |
| 80 | 54 | export const ownWords = (src: string): number => [...src.matchAll(OWN_FORM)].length; |
| 81 | 55 | |
| 82 | 56 | /** |
| 83 | * Files under src/web off their OWN_WORDS count, each with its fix: `over` words more bare "No …" | |
| 84 | * empty states than named (the table moves them), `moved` fewer (the count is lowered). | |
| 57 | * Files under src/web that word a bare "No …" empty state, each with its fix (#18351): none may. | |
| 85 | 58 | */ |
| 86 | export function ownWordsOff(files: readonly Source[]): { over: string[]; moved: string[] } { | |
| 87 | const over: string[] = []; | |
| 88 | const moved: string[] = []; | |
| 89 | for (const f of files) { | |
| 90 | const n = ownWords(f.text), named = OWN_WORDS[f.path] ?? 0; | |
| 91 | if (n > named) over.push(`${f.path}: ${n} > ${named} bare 'No …' empty states. ${RATCHET_FIX.ownWordsOver}`); | |
| 92 | else if (n < named) moved.push(`${f.path}: ${n} < ${named} bare 'No …' empty states. ${RATCHET_FIX.ownWordsMoved}`); | |
| 93 | } | |
| 94 | return { over, moved }; | |
| 59 | export function bareNoFindings(files: readonly Source[]): string[] { | |
| 60 | return files.flatMap((f) => { | |
| 61 | const n = ownWords(f.text); | |
| 62 | return n === 0 ? [] : [`${f.path}: ${n} bare 'No …' empty state${n === 1 ? "" : "s"}. ${RATCHET_FIX.ownWordsOver}`]; | |
| 63 | }); | |
| 95 | 64 | } |
| 96 | 65 | |
| 97 | 66 | /** Paths under src/ the width ratchet does not read. */ |
src/web/diff-view.ts +2 −2
| @@ -26,7 +26,6 @@ import { | ||
| 26 | 26 | btn, |
| 27 | 27 | card, |
| 28 | 28 | disclosure, |
| 29 | empty, | |
| 30 | 29 | field as formField, |
| 31 | 30 | icon, |
| 32 | 31 | listCard, |
| @@ -38,6 +37,7 @@ import { kept, type Refused } from "./form.ts"; | ||
| 38 | 37 | import { renderMarkdown } from "./markdown.ts"; |
| 39 | 38 | import { permalink } from "./comments.ts"; |
| 40 | 39 | import { wordDiff, type Segment } from "./worddiff.ts"; |
| 40 | import { emptyList } from "./empty_words.ts"; | |
| 41 | 41 | |
| 42 | 42 | /** Highlighted tokens per side for a file, keyed by path in a SyntaxMap. */ |
| 43 | 43 | export interface FileTokens { |
| @@ -614,7 +614,7 @@ export function renderDiff( | ||
| 614 | 614 | const opts: DiffViewOptions = |
| 615 | 615 | options instanceof Map ? { syntax: options } : (options ?? {}); |
| 616 | 616 | if (diff.files.length === 0) { |
| 617 | return empty({ title: "No changes." }); | |
| 617 | return emptyList("diffChanges"); | |
| 618 | 618 | } |
| 619 | 619 | const shown = diff.files.slice(0, MAX_DIFF_FILES); |
| 620 | 620 | const hidden = diff.files.length - shown.length; |
src/web/empty_words.ts +10 −2
| @@ -60,6 +60,13 @@ const ICONS = { | ||
| 60 | 60 | labels: "tag", |
| 61 | 61 | events: "activity", |
| 62 | 62 | seriesAnswered: "activity", |
| 63 | diffChanges: "commit", | |
| 64 | commitsPaged: "commit", | |
| 65 | displayBuilds: "pin", | |
| 66 | issueRepos: "issue", | |
| 67 | originAccount: "download", | |
| 68 | originConnect: "search", | |
| 69 | templateForges: "search", | |
| 63 | 70 | } as const satisfies Partial<Record<EmptyKind, IconName>>; |
| 64 | 71 | |
| 65 | 72 | export interface EmptyOptions { |
| @@ -96,8 +103,9 @@ export function emptyList(kind: keyof typeof ICONS, o: EmptyOptions = {}): Html | ||
| 96 | 103 | * line, the sentence and its reason, no picture and no link, so the form stays in view. It is also |
| 97 | 104 | * the compact form for small inline lists (a fieldset, a list item, a narrow phone), where the |
| 98 | 105 | * picture block would cost layout and bytes; any kind may be drawn this way. */ |
| 99 | export function emptyLine(kind: EmptyKind, o: { reason?: string; id?: string } = {}): Html { | |
| 100 | const text = o.reason === undefined ? emptyText(kind) : `${EMPTY_WORDS[kind].sentence} ${o.reason}`; | |
| 106 | export function emptyLine(kind: EmptyKind, o: { reason?: string; id?: string; subject?: string } = {}): Html { | |
| 107 | const sentence = EMPTY_WORDS[kind].sentence.replaceAll("{}", () => o.subject ?? "{}"); | |
| 108 | const text = o.reason === undefined ? emptyText(kind, o.subject) : `${sentence} ${o.reason}`; | |
| 101 | 109 | if (o.id !== undefined) return html`<p class="muted small" id="${o.id}">${text}</p>`; |
| 102 | 110 | return html`<p class="muted small">${text}</p>`; |
| 103 | 111 | } |
src/web/pages/boards.ts +2 −1
| @@ -23,6 +23,7 @@ import { page } from "../layout.ts"; | ||
| 23 | 23 | import { btn, card, chartFrame, empty, field, selectField } from "../ui.ts"; |
| 24 | 24 | import { count, figure, figures, fold, reading, readingFailed, readingReplaceJs } from "../figure.ts"; |
| 25 | 25 | import { readForm } from "../form.ts"; |
| 26 | import { emptyList } from "../empty_words.ts"; | |
| 26 | 27 | |
| 27 | 28 | const AGGREGATES = ["count", "sum", "avg", "max"] as const; |
| 28 | 29 | const OPS = ["eq", "ne", "lt", "lte", "gt", "gte", "starts"] as const; |
| @@ -172,7 +173,7 @@ async function explorer(ctx: Ctx, user: NonNullable<Ctx["auth"]["user"]>, asked: | ||
| 172 | 173 | if (!answer.ok) { |
| 173 | 174 | result = empty({ icon: "activity", title: "That query was refused", note: answer.error }); |
| 174 | 175 | } else if (answer.points === 0) { |
| 175 | result = empty({ icon: "activity", title: "No rows", note: "Nothing matches this query. Change the question below, or start from one of the questions above." }); | |
| 176 | result = emptyList("rows", { reason: "Nothing matches this query. Change the question below, or start from one of the questions above." }); | |
| 176 | 177 | } else if (answer.chart === null) { |
| 177 | 178 | result = html`<p class="bd-sub">The rows behind one point, as the values of ${columnWords(cols[0] ?? "")} with how many rows have each. <a href="${link({ ...p, rows: "" })}">Back to the chart</a>.</p>${raw(answer.table)}`; |
| 178 | 179 | } else { |
src/web/pages/browse.ts +2 −2
| @@ -25,7 +25,7 @@ | ||
| 25 | 25 | * labels and authors instead. |
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | import { emptyList } from "../empty_words.ts"; | |
| 28 | import { emptyLine, emptyList } from "../empty_words.ts"; | |
| 29 | 29 | import { binaryRefusal } from "../render/opens_with.ts"; |
| 30 | 30 | import { clamp } from "../clamp.ts"; |
| 31 | 31 | import { mirrorJobFor, startMirrorJob } from "../../actions/origins.ts"; |
| @@ -749,7 +749,7 @@ async function browseThread( | ||
| 749 | 749 | <aside> |
| 750 | 750 | ${card( |
| 751 | 751 | detail.issue.labels.length === 0 |
| 752 | ? html`<p class="muted small">No labels.</p>` | |
| 752 | ? emptyLine("labels") | |
| 753 | 753 | : html`<div class="bar"> |
| 754 | 754 | ${detail.issue.labels.map((l) => labelChip(l))} |
| 755 | 755 | </div>`, |
src/web/pages/build_shots.ts +2 −1
| @@ -14,6 +14,7 @@ import type { Ctx } from "../../http/context.ts"; | ||
| 14 | 14 | import { crumbsFor, loadRepo, notFoundPage, repoBase, repoHeader, repoPalette } from "../chrome.ts"; |
| 15 | 15 | import { html, type Html } from "../html.ts"; |
| 16 | 16 | import { page } from "../layout.ts"; |
| 17 | import { emptyLine } from "../empty_words.ts"; | |
| 17 | 18 | |
| 18 | 19 | export const SHOTS_LIVE = "build.shots,build.pinned"; |
| 19 | 20 | |
| @@ -30,7 +31,7 @@ export async function shotsPage(ctx: Ctx): Promise<Response> { | ||
| 30 | 31 | const at = `${base}/builds/${encodeURIComponent(label)}/shots`; |
| 31 | 32 | const grid: Html = |
| 32 | 33 | shots.items.length === 0 |
| 33 | ? html`<p class="muted small">No screenshots on ${label} yet.</p>` | |
| 34 | ? emptyLine("shots", { subject: label }) | |
| 34 | 35 | : html`<div class="looks">${shots.items.map( |
| 35 | 36 | (s) => html`<figure> |
| 36 | 37 | <a class="look" href="${at}/${s.file}?v=${s.oid.slice(0, 12)}"><img src="${at}/${s.file}?v=${s.oid.slice(0, 12)}" alt="${s.caption === "" ? `Screenshot ${s.file}` : s.caption}" width="320" height="240" loading="lazy" decoding="async" /></a> |
src/web/pages/commits.ts +1 −2
| @@ -33,7 +33,6 @@ import { localScope, scopeGlyph, type RepoScope } from "../scope.ts"; | ||
| 33 | 33 | import { |
| 34 | 34 | avatar, |
| 35 | 35 | badge, |
| 36 | empty, | |
| 37 | 36 | messageText, |
| 38 | 37 | originTag, |
| 39 | 38 | pager, |
| @@ -211,7 +210,7 @@ export function historyBar( | ||
| 211 | 210 | |
| 212 | 211 | export const noCommits = (later: boolean): Html => |
| 213 | 212 | later |
| 214 | ? empty({ icon: "commit", title: "No commits on this page", note: "You have paged past the end of this history." }) | |
| 213 | ? emptyList("commitsPaged") | |
| 215 | 214 | : emptyList("commits", { noAction: true }); |
| 216 | 215 | |
| 217 | 216 | // ---- the local pages ---- |
src/web/pages/contribute.ts +2 −1
| @@ -9,6 +9,7 @@ import type { Ctx } from "../../http/context.ts"; | ||
| 9 | 9 | import { welcome } from "../../system/telemetry.ts"; |
| 10 | 10 | import { html, type Html } from "../html.ts"; |
| 11 | 11 | import { page } from "../layout.ts"; |
| 12 | import { emptyText } from "../../core/empty_words.ts"; | |
| 12 | 13 | |
| 13 | 14 | /** The welcomed issues as rows the shell's j/k walk; Enter opens the issue. */ |
| 14 | 15 | export function welcomedList(issues: readonly { path: string; repo: string; number: number; title: string }[]): Html { |
| @@ -31,7 +32,7 @@ export function contributePage(ctx: Ctx): Response { | ||
| 31 | 32 | <section class="stack" aria-labelledby="welcome-h"> |
| 32 | 33 | <h2 id="welcome-h">Issues that welcome outside work</h2> |
| 33 | 34 | ${w.issues.length === 0 |
| 34 | ? html`<p class="muted">No open issue carries the “${w.welcomeLabel}” label right now.</p>` | |
| 35 | ? html`<p class="muted">${emptyText("welcomeIssues", `the “${w.welcomeLabel}” label`)}</p>` | |
| 35 | 36 | : welcomedList(w.issues)} |
| 36 | 37 | </section> |
| 37 | 38 | <section class="stack" aria-labelledby="propose-h"> |
src/web/pages/display.ts +3 −3
| @@ -21,8 +21,8 @@ import type { Ctx } from "../../http/context.ts"; | ||
| 21 | 21 | import { crumbsFor, forbiddenPage, loadRepo, notFoundPage, repoBase, repoHeader, repoPalette } from "../chrome.ts"; |
| 22 | 22 | import { html, raw } from "../html.ts"; |
| 23 | 23 | import { flashTo, page } from "../layout.ts"; |
| 24 | import { EMPTY_WORDS } from "../empty_words.ts"; | |
| 25 | import { btn, empty } from "../ui.ts"; | |
| 24 | import { EMPTY_WORDS, emptyList } from "../empty_words.ts"; | |
| 25 | import { btn } from "../ui.ts"; | |
| 26 | 26 | import { readForm } from "../form.ts"; |
| 27 | 27 | |
| 28 | 28 | const LAYOUT_WORD = { shelf: "Shelf", grid: "Grid", graph: "Graph" } as const; |
| @@ -63,7 +63,7 @@ export async function displayPage(ctx: Ctx): Promise<Response> { | ||
| 63 | 63 | ${!config.ok |
| 64 | 64 | ? html`<p role="alert">${config.error}</p>` |
| 65 | 65 | : items.length === 0 |
| 66 | ? empty({ icon: "pin", title: "No builds", note: "This display shows no builds yet." }) | |
| 66 | ? emptyList("displayBuilds") | |
| 67 | 67 | : html`<p>${LAYOUT_WORD[config.value.layout]} · ${String(items.length)} ${items.length === 1 ? "build" : "builds"}</p> |
| 68 | 68 | <div class="table-scroll" role="region" tabindex="0" aria-label="Builds"> |
| 69 | 69 | <table class="table" data-dense data-by="display-builds"> |
src/web/pages/family.ts +2 −1
| @@ -20,6 +20,7 @@ import { badge, row } from "../ui.ts"; | ||
| 20 | 20 | import { FOLLOW_WORD } from "../../actions/follow_words.ts"; |
| 21 | 21 | import { familyTreeJs } from "./family_tree_js.ts"; |
| 22 | 22 | import { NO_KEY_HELD, NO_KEY_HOST_LINE } from "../../crew/no_key.ts"; |
| 23 | import { emptyLine } from "../empty_words.ts"; | |
| 23 | 24 | |
| 24 | 25 | export interface Node { |
| 25 | 26 | readonly label: string; |
| @@ -162,7 +163,7 @@ export async function familyPage( | ||
| 162 | 163 | ${treeRow(root, 0)} |
| 163 | 164 | </ul> |
| 164 | 165 | ${kids.more > 0 ? html`<p class="muted small">${plural(kids.more, "more forge")} not shown.</p>` : null} |
| 165 | ${alone ? html`<p class="muted small">No parent, and none sent.</p>` : null} | |
| 166 | ${alone ? emptyLine("familyAlone") : null} | |
| 166 | 167 | ${ctx.auth.user === undefined ? null : html`<p class="muted small" data-fork-flows-link><a href="/forks/flows">Fork flows</a></p>`} |
| 167 | 168 | </div>`, |
| 168 | 169 | }); |
src/web/pages/inventory.ts +3 −5
| @@ -16,8 +16,9 @@ import type { Ctx } from "../../http/context.ts"; | ||
| 16 | 16 | import { notFoundPage, pageHead, signInFirst } from "../chrome.ts"; |
| 17 | 17 | import { html, type Html } from "../html.ts"; |
| 18 | 18 | import { page } from "../layout.ts"; |
| 19 | import { badge, btn, empty, row, seg, type Tone } from "../ui.ts"; | |
| 19 | import { badge, btn, row, seg, type Tone } from "../ui.ts"; | |
| 20 | 20 | import { securityFloor } from "../../http/respond.ts"; |
| 21 | import { emptyList } from "../empty_words.ts"; | |
| 21 | 22 | |
| 22 | 23 | const TONE: Record<MigrationState, Tone> = { |
| 23 | 24 | not_started: "default", |
| @@ -98,10 +99,7 @@ export async function inventoryPage(ctx: Ctx): Promise<Response> { | ||
| 98 | 99 | const rendering = performance.now(); |
| 99 | 100 | const body = |
| 100 | 101 | origins.length === 0 |
| 101 | ? empty({ | |
| 102 | icon: "download", | |
| 103 | title: "No account connected", | |
| 104 | note: "Connect the account the apps live on, and what is left there is listed here.", | |
| 102 | ? emptyList("originAccount", { | |
| 105 | 103 | action: btn("Connect an account", { href: "/migrate", variant: "primary" }), |
| 106 | 104 | }) |
| 107 | 105 | : html`${pageHead("What is left to bring over", { |
src/web/pages/issues.ts +2 −1
| @@ -50,6 +50,7 @@ import { | ||
| 50 | 50 | pageTitle, |
| 51 | 51 | tellsHref, |
| 52 | 52 | } from "../studio/nouns.ts"; |
| 53 | import { emptyList } from "../empty_words.ts"; | |
| 53 | 54 | |
| 54 | 55 | // ---- compose ---- |
| 55 | 56 | |
| @@ -229,7 +230,7 @@ export function newIssueAnywhere(ctx: Ctx): Response { | ||
| 229 | 230 | title: "New issue", |
| 230 | 231 | body: html`<div class="page-head"><h1>New issue</h1></div> |
| 231 | 232 | ${repos.length === 0 |
| 232 | ? empty({ icon: "issue", title: "No repository to open an issue in", note: "Open one from a repository you can see." }) | |
| 233 | ? emptyList("issueRepos") | |
| 233 | 234 | : html`<p class="muted">Which repository?</p>${listCard( |
| 234 | 235 | repos.map((r) => |
| 235 | 236 | row({ |
src/web/pages/looks.ts +2 −3
| @@ -41,6 +41,7 @@ import { noPicture } from "../look_none.ts"; | ||
| 41 | 41 | import { loadRepo, repoBase } from "../chrome.ts"; |
| 42 | 42 | import { html, when, type Html } from "../html.ts"; |
| 43 | 43 | import { disclosure, sha, time } from "../ui.ts"; |
| 44 | import { emptyLine } from "../empty_words.ts"; | |
| 44 | 45 | |
| 45 | 46 | /** The newest picture at one width, when there is one. */ |
| 46 | 47 | export const pictured = ( |
| @@ -171,9 +172,7 @@ export function lookCard( | ||
| 171 | 172 | if (taken.length === 0 && attached.length === 0) { |
| 172 | 173 | if (pull.state !== "open" || pull.mergedAt !== null) return html``; |
| 173 | 174 | return block( |
| 174 | html`<p class="muted small"> | |
| 175 | No picture yet. One is taken when the preview comes up green. | |
| 176 | </p>`, | |
| 175 | emptyLine("lookPicture"), | |
| 177 | 176 | ); |
| 178 | 177 | } |
| 179 | 178 | // Home first, then the rest in the order the manifest is likeliest to |
src/web/pages/notes.ts +2 −1
| @@ -22,6 +22,7 @@ import { html } from "../html.ts"; | ||
| 22 | 22 | import { flashTo, page } from "../layout.ts"; |
| 23 | 23 | import { btn, listCard, row, time } from "../ui.ts"; |
| 24 | 24 | import { cut } from "../../actions/ask_state_words.ts"; |
| 25 | import { emptyLine } from "../empty_words.ts"; | |
| 25 | 26 | |
| 26 | 27 | const HERE = "/notes"; |
| 27 | 28 | const SHOWN = 100; |
| @@ -86,7 +87,7 @@ export async function notesView(ctx: Ctx): Promise<Response> { | ||
| 86 | 87 | <div class="bar"><span class="muted small">Enter saves · Shift+Enter for a new line</span><span class="spacer"></span>${btn("Save", { variant: "primary" })}</div> |
| 87 | 88 | </form> |
| 88 | 89 | ${rows.length === 0 |
| 89 | ? html`<p class="muted small">No notes yet. Write one above.</p>` | |
| 90 | ? emptyLine("notes") | |
| 90 | 91 | : listCard(rows, { extra: "bare" })}</div>`; |
| 91 | 92 | return timePhase(ctx.request, "render", () => |
| 92 | 93 | page({ ctx, title: "Notes", body, styleCss: NOTES_CSS, scriptJs: notesJs, description: "Write an idea; watch it become shipped work." }), |
src/web/pages/origin-flow.ts +1 −1
| @@ -132,7 +132,7 @@ export function originFlowPage(ctx: Ctx): Response { | ||
| 132 | 132 | <div class="narrow-wide"> |
| 133 | 133 | ${body}${waiting} |
| 134 | 134 | <p class="muted small mt"> |
| 135 | No JavaScript? Refresh this page to check again — the reload re-polls. | |
| 135 | Without JavaScript, refresh this page to check again — the reload re-polls. | |
| 136 | 136 | </p> |
| 137 | 137 | </div>`, |
| 138 | 138 | scriptJs: pollJs, |
src/web/pages/origins.ts +2 −5
| @@ -89,7 +89,6 @@ import { | ||
| 89 | 89 | badge, |
| 90 | 90 | btn, |
| 91 | 91 | confirmAction, |
| 92 | empty, | |
| 93 | 92 | icon, |
| 94 | 93 | row, |
| 95 | 94 | time, |
| @@ -98,6 +97,7 @@ import { | ||
| 98 | 97 | copyField, |
| 99 | 98 | toast, |
| 100 | 99 | } from "../ui.ts"; |
| 100 | import { emptyList } from "../empty_words.ts"; | |
| 101 | 101 | |
| 102 | 102 | export type AccountSection = |
| 103 | 103 | | "bring" |
| @@ -1308,10 +1308,7 @@ export async function originAppDelete(ctx: Ctx): Promise<Response> { | ||
| 1308 | 1308 | } |
| 1309 | 1309 | |
| 1310 | 1310 | export function notFoundNote(): Html { |
| 1311 | return empty({ | |
| 1312 | icon: "search", | |
| 1313 | title: "No such connect", | |
| 1314 | note: "It finished, expired, or was never yours. Start again from Connected accounts.", | |
| 1311 | return emptyList("originConnect", { | |
| 1315 | 1312 | action: btn("Back to connected accounts", { |
| 1316 | 1313 | href: "/settings/origins", |
| 1317 | 1314 | variant: "primary", |
src/web/pages/packs.ts +2 −2
| @@ -162,7 +162,7 @@ function curatedPage(ctx: Ctx, pack: CuratedPack, legacy: Pack | undefined): Res | ||
| 162 | 162 | : html`<section class="stack"> |
| 163 | 163 | <h2>Deploy it on your own machine</h2> |
| 164 | 164 | ${copyField("pack-command", commands.join("\n"), `The command that deploys the ${legacy.title} pack`, "Copy the command", { lines: commands.length })} |
| 165 | <p class="muted small">No data, secrets or variables come with it.</p> | |
| 165 | <p class="muted small">Data, secrets and variables do not come with it.</p> | |
| 166 | 166 | </section>`} |
| 167 | 167 | <section class="stack"> |
| 168 | 168 | <h2>The apps inside</h2> |
| @@ -199,7 +199,7 @@ export async function packPage(ctx: Ctx): Promise<Response> { | ||
| 199 | 199 | ${copyField("pack-command", commands.join("\n"), `The command that deploys the ${pack.title} pack`, "Copy the command", { |
| 200 | 200 | lines: commands.length, |
| 201 | 201 | })} |
| 202 | <p class="muted small">No data, secrets or variables come with it.</p> | |
| 202 | <p class="muted small">Data, secrets and variables do not come with it.</p> | |
| 203 | 203 | </section> |
| 204 | 204 | <section class="stack" id="pack-facts"> |
| 205 | 205 | <h2>What it brings</h2> |
src/web/pages/pull.ts +2 −1
| @@ -148,6 +148,7 @@ import { | ||
| 148 | 148 | pullPage, |
| 149 | 149 | wallCard, |
| 150 | 150 | } from "../studio/change.ts"; |
| 151 | import { emptyLine } from "../empty_words.ts"; | |
| 151 | 152 | |
| 152 | 153 | /** Parse a "path~side~line" review anchor from a link or form field. */ |
| 153 | 154 | function parseAnchor( |
| @@ -1209,7 +1210,7 @@ export async function pullFilesPage(ctx: Ctx): Promise<Response> { | ||
| 1209 | 1210 | : []; |
| 1210 | 1211 | const commitsCard = card( |
| 1211 | 1212 | commits.length === 0 |
| 1212 | ? html`<p class="muted small">No commits to show.</p>` | |
| 1213 | ? emptyLine("commitsShown") | |
| 1213 | 1214 | : html`<ul class="list"> |
| 1214 | 1215 | ${commits.map( |
| 1215 | 1216 | (commit) => |
src/web/pages/reports.ts +2 −1
| @@ -74,6 +74,7 @@ import { pageAddress } from "../studio/toolbar.ts"; | ||
| 74 | 74 | import { html, when, type Html } from "../html.ts"; |
| 75 | 75 | import { flashTo, page } from "../layout.ts"; |
| 76 | 76 | import { btn, field as formField, messageText, row, seg, time } from "../ui.ts"; |
| 77 | import { emptyLine } from "../empty_words.ts"; | |
| 77 | 78 | |
| 78 | 79 | /** The repository, when it takes reports: public, and so seen by anyone. */ |
| 79 | 80 | function publicRepo(ctx: Ctx): Repo | undefined { |
| @@ -575,7 +576,7 @@ export function securityPage(ctx: Ctx): Response { | ||
| 575 | 576 | <p class="hint">The sealed reports labelled <code>security</code>, worst first, to fix or dismiss.</p> |
| 576 | 577 | ${filterBar(base, filter)} |
| 577 | 578 | ${groups.length === 0 |
| 578 | ? html`<p class="muted small mt">No security reports match.</p>` | |
| 579 | ? html`<div class="mt">${emptyLine("reportsMatch")}</div>` | |
| 579 | 580 | : groups.map( |
| 580 | 581 | (g) => html`<section class="settings-block"> |
| 581 | 582 | <h2>${g.s} · ${String(g.items.length)}</h2> |
src/web/pages/sources.ts +2 −1
| @@ -36,6 +36,7 @@ import { btn, seg } from "../ui.ts"; | ||
| 36 | 36 | import { accountSections } from "./origins.ts"; |
| 37 | 37 | import { settingsPageResponse, timedAdminRepo } from "./settings.ts"; |
| 38 | 38 | import { getAppByRepo } from "../../core/apps.ts"; |
| 39 | import { emptyLine } from "../empty_words.ts"; | |
| 39 | 40 | |
| 40 | 41 | const CHART_W = 600; |
| 41 | 42 | const CHART_H = 72; |
| @@ -230,7 +231,7 @@ export function sourcesBody(ctx: Ctx, q: Query, label: string): Html { | ||
| 230 | 231 | </div> |
| 231 | 232 | ${filters(q)} |
| 232 | 233 | ${empties |
| 233 | ? html`<p class="muted">No visits recorded for ${label} in ${WINDOWS[q.window]} days.</p>` | |
| 234 | ? emptyLine("visits", { subject: `${label} in ${WINDOWS[q.window]} days` }) | |
| 234 | 235 | : html`${block( |
| 235 | 236 | "Visits", |
| 236 | 237 | html`<dl class="stats"> |
src/web/studio/explore.ts +2 −5
| @@ -50,6 +50,7 @@ import { compact } from "../compact.ts"; | ||
| 50 | 50 | import { page, redirect } from "../layout.ts"; |
| 51 | 51 | import { heldCopy, pageTag } from "../page_tag.ts"; |
| 52 | 52 | import { btn, card, chartFrame, empty, nameMark, row as rowOf, seg, tabs, time } from "../ui.ts"; |
| 53 | import { emptyList } from "../empty_words.ts"; | |
| 53 | 54 | |
| 54 | 55 | const href = (query: ExploreQuery, page = 1): string => { |
| 55 | 56 | const params = new URLSearchParams(exploreParams(query)); |
| @@ -176,11 +177,7 @@ function terms(query: ExploreQuery): { term: string; without: ExploreQuery }[] { | ||
| 176 | 177 | function emptyState(ctx: Ctx, query: ExploreQuery): Html { |
| 177 | 178 | const line = exploreLine(query); |
| 178 | 179 | if (query.template !== undefined) |
| 179 | return empty({ | |
| 180 | icon: "search", | |
| 181 | title: `No forges to show for ${echoed(query.template)}`, | |
| 182 | note: "Only admins can list forges started from a template.", | |
| 183 | }); | |
| 180 | return emptyList("templateForges", { title: `No forges to show for ${echoed(query.template)}` }); | |
| 184 | 181 | if (line !== "") |
| 185 | 182 | return empty({ |
| 186 | 183 | icon: "search", |
src/web/studio/hold.ts +1 −1
| @@ -47,7 +47,7 @@ export function holdCard( | ||
| 47 | 47 | () => html`<p class="muted small">Releases on green.</p>`, |
| 48 | 48 | )} |
| 49 | 49 | <p class="muted small"> |
| 50 | No rule sends it to review or lands it until it is released. A person | |
| 50 | Until it is released, no rule sends it to review or lands it. A person | |
| 51 | 51 | can still ship it. |
| 52 | 52 | </p> |
| 53 | 53 | ${when( |
test/design-lint-ratchets.test.ts +5 −8
| @@ -4,7 +4,7 @@ | ||
| 4 | 4 | */ |
| 5 | 5 | import { expect, test } from "bun:test"; |
| 6 | 6 | import { ratchetFindings } from "../scripts/design-lint.ts"; |
| 7 | import { OWN_WORDS, RATCHET_FIX, WIDTH_READS } from "../src/design/ratchets.ts"; | |
| 7 | import { RATCHET_FIX, WIDTH_READS } from "../src/design/ratchets.ts"; | |
| 8 | 8 | |
| 9 | 9 | const page = "src/web/pages/packs.ts"; |
| 10 | 10 | const reader = "src/web/pages/map.ts"; |
| @@ -12,20 +12,17 @@ const bareNo = (n: number) => Array.from({ length: n }, () => `<p class="small m | ||
| 12 | 12 | const reads = (n: number) => Array.from({ length: n }, () => "const w = window.inner" + "Width;").join("\n"); |
| 13 | 13 | |
| 14 | 14 | test("one extra bare 'No …' and one extra width read are both named, with the fix", () => { |
| 15 | const web = [{ path: page, text: bareNo(OWN_WORDS[page]! + 1) }]; | |
| 15 | const web = [{ path: page, text: bareNo(1) }]; | |
| 16 | 16 | const src = [{ path: reader, text: reads(WIDTH_READS[reader]! + 1) }]; |
| 17 | 17 | const found = ratchetFindings(web, src); |
| 18 | 18 | expect(found).toEqual([ |
| 19 | `${page}: 3 > 2 bare 'No …' empty states. ${RATCHET_FIX.ownWordsOver}`, | |
| 19 | `${page}: 1 bare 'No …' empty state. ${RATCHET_FIX.ownWordsOver}`, | |
| 20 | 20 | `${reader}: 3 > 2 reads of a width in script. ${RATCHET_FIX.widthOver}`, |
| 21 | 21 | ]); |
| 22 | 22 | }); |
| 23 | 23 | |
| 24 | test("a file at its count is quiet; one below is told to lower it", () => { | |
| 25 | expect(ratchetFindings([{ path: page, text: bareNo(2) }], [{ path: reader, text: reads(2) }])).toEqual([]); | |
| 26 | expect(ratchetFindings([{ path: page, text: bareNo(1) }], [])).toEqual([ | |
| 27 | `${page}: 1 < 2 bare 'No …' empty states. ${RATCHET_FIX.ownWordsMoved}`, | |
| 28 | ]); | |
| 24 | test("a width file at its count is quiet; no page may hold a bare 'No …'", () => { | |
| 25 | expect(ratchetFindings([{ path: page, text: "" }], [{ path: reader, text: reads(2) }])).toEqual([]); | |
| 29 | 26 | }); |
| 30 | 27 | |
| 31 | 28 | test("a file nobody named may hold none", () => { |
test/empty-notes.test.ts +2 −2
| @@ -19,14 +19,14 @@ test("emptyNote draws the table's sentence in one muted paragraph", () => { | ||
| 19 | 19 | expect(String(emptyNote("noChangeYet"))).toContain(NOTE_WORDS.noChangeYet); |
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | // Pages that word their own empty note, by file: none opens with a bare "No" (the ratchet in | |
| 23 | // src/design/ratchets.ts holds that); these four carry a variable or a link, so they stay. | |
| 22 | 24 | // Pages that word their own empty note, by file. Move one onto NOTE_WORDS and lower its count. |
| 23 | 25 | const OWN_WORDS: Readonly<Record<string, number>> = { |
| 24 | 26 | "src/web/pages/next.ts": 1, |
| 25 | 27 | "src/web/pages/now.ts": 1, |
| 26 | 28 | "src/web/pages/waves.ts": 1, |
| 27 | "src/web/pages/sources.ts": 1, | |
| 28 | 29 | "src/web/pages/series.ts": 1, |
| 29 | "src/web/pages/contribute.ts": 1, | |
| 30 | 30 | }; |
| 31 | 31 | |
| 32 | 32 | test("the pages that still word their own empty note are the ones named, no more", async () => { |
test/empty-words-all.test.ts +16 −14
| @@ -6,8 +6,9 @@ | ||
| 6 | 6 | * @tree-scan: walks all of src/web/ through tsSources (src/design/ratchets.ts). |
| 7 | 7 | */ |
| 8 | 8 | import { expect, test } from "bun:test"; |
| 9 | import { EMPTY_WORDS } from "../src/core/empty_words.ts"; | |
| 10 | import { ownWordsOff, RATCHET_FIX, tsSources } from "../src/design/ratchets.ts"; | |
| 9 | import { emptyLine } from "../src/web/empty_words.ts"; | |
| 10 | import { EMPTY_WORDS, emptyText } from "../src/core/empty_words.ts"; | |
| 11 | import { bareNoFindings, RATCHET_FIX, tsSources } from "../src/design/ratchets.ts"; | |
| 11 | 12 | |
| 12 | 13 | // The form a page's own "No …" empty state takes, and the table of pages that still word one (a |
| 13 | 14 | // ratchet: no more than its count, and the count exact), live in src/design/ratchets.ts, so |
| @@ -44,20 +45,21 @@ test("a link is a label and a place that exists; no default href points nowhere" | ||
| 44 | 45 | } |
| 45 | 46 | }); |
| 46 | 47 | |
| 47 | test("a page does not word more bare 'No …' empty states than it is named for", () => { | |
| 48 | expect(ownWordsOff(files).over).toEqual([]); | |
| 48 | test("no page words a bare 'No …' empty state", () => { | |
| 49 | expect(bareNoFindings(files)).toEqual([]); | |
| 49 | 50 | }); |
| 50 | 51 | |
| 51 | test("a page that moved to the table is off the list of own words", () => { | |
| 52 | expect(ownWordsOff(files).moved).toEqual([]); | |
| 52 | test("a bare 'No …' in either form is named, with the fix", () => { | |
| 53 | for (const text of ['<p class="muted">No rows</p>', 'empty({ title: "No rows" })', 'empty("No rows")', 'emptyLine("rows", { sentence: "No rows here." })', "emptyLine('rows', { sentence: `No rows on ${x}.` })"]) { | |
| 54 | const found = bareNoFindings([{ path: "src/web/pages/new.ts", text }]); | |
| 55 | expect(found).toEqual([`src/web/pages/new.ts: 1 bare 'No …' empty state. ${RATCHET_FIX.ownWordsOver}`]); | |
| 56 | } | |
| 57 | expect(bareNoFindings([{ path: "src/web/pages/new.ts", text: 'emptyList("rows")' }])).toEqual([]); | |
| 53 | 58 | }); |
| 54 | 59 | |
| 55 | test("each own-words failure ends with the sentence that says which table or line to change", () => { | |
| 56 | const over = ownWordsOff([{ path: "src/web/pages/new.ts", text: '<p class="muted">No rows</p>' }]).over; | |
| 57 | const moved = ownWordsOff([{ path: "src/web/pages/packs.ts", text: "" }]).moved; | |
| 58 | expect(over.length).toBe(1); | |
| 59 | expect(over[0]!.endsWith(RATCHET_FIX.ownWordsOver)).toBe(true); | |
| 60 | expect(moved.length).toBe(1); | |
| 61 | expect(moved[0]!.endsWith(RATCHET_FIX.ownWordsMoved)).toBe(true); | |
| 62 | expect(RATCHET_FIX.ownWordsMoved).toContain("moved to the table"); | |
| 60 | test("a `{}` in the table's words is filled by the page's subject, on the page and in the terminal", () => { | |
| 61 | expect(emptyText("shots", "v1")).toBe("No screenshots on v1 yet."); | |
| 62 | expect(String(emptyLine("visits", { subject: "v1 in 7 days" }))).toContain("No visits recorded for v1 in 7 days."); | |
| 63 | expect(String(emptyLine("shots", { subject: "<b>", reason: "Wait." }))).toContain("No screenshots on <b> yet. Wait."); | |
| 64 | expect(emptyText("welcomeIssues", "the “x” label")).toBe("No open issue carries the “x” label right now."); | |
| 63 | 65 | }); |
test/holds.test.ts +1 −1
| @@ -709,7 +709,7 @@ describe("a hold is set, shown and lifted", () => { | ||
| 709 | 709 | expect(after).toContain("holds this"); |
| 710 | 710 | expect(after).toContain(WHY); |
| 711 | 711 | expect(after).toContain( |
| 712 | "No rule sends it to review or lands it until it is released", | |
| 712 | "Until it is released, no rule sends it to review or lands it", | |
| 713 | 713 | ); |
| 714 | 714 | expect(after).toContain( |
| 715 | 715 | `action="/alice/garden/pulls/${pull.number}/release"`, |
test/packs.test.ts +1 −1
| @@ -207,7 +207,7 @@ describe("pages", () => { | ||
| 207 | 207 | expect(one.status).toBe(200); |
| 208 | 208 | const body = await one.text(); |
| 209 | 209 | expect(body).toContain("scripts/pack.ts deploy games"); |
| 210 | expect(body).toContain("No data, secrets or variables come with it."); | |
| 210 | expect(body).toContain("Data, secrets and variables do not come with it."); | |
| 211 | 211 | expect(body).not.toContain("Help build these apps</h2>"); |
| 212 | 212 | expect(body).toContain("gabrielecirulli/2048"); |
| 213 | 213 | expect((await fetch(`${servers.url}/packs/nothing`)).status).toBe(404); |
test/web-origins.test.ts +1 −1
| @@ -674,7 +674,7 @@ describe("origins on the web", () => { | ||
| 674 | 674 | expect(page).toContain(ghOauth.verificationUri); |
| 675 | 675 | // The no-JavaScript half is on the page, and says so. |
| 676 | 676 | expect(page).toContain("Check again"); |
| 677 | expect(page).toContain("Refresh this page to check again"); | |
| 677 | expect(page).toContain("Without JavaScript, refresh this page to check again"); | |
| 678 | 678 | // The device code itself never crosses to the browser. |
| 679 | 679 | expect(page).not.toContain(ghOauth.deviceCode); |
| 680 | 680 |
new above
offline
Non-blocking: the next line repeats this comment and still says to lower a count. Drop the older one.